/**
* 1.解题思路:边输入边处理输出
* 假设当前输入的temp值在a~b区间就将temp替换为num
* 以%03d的方式输出temp~
*
* 2.参考博客:https://www.liuchuo.net/archives/3747
**/
#include <iostream>
using namespace std;
int main() {
int m, n, a, b, num, temp;
scanf("%d%d%d%d%d", &m, &n, &a, &b, &num);
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
scanf("%d", &temp);
if (temp >= a && temp <= b)
temp = num;
if (j != 0) printf(" ");
printf("%03d", temp);
}
printf("\n");
}
return 0;
}
1066 图像过滤
最新推荐文章于 2023-03-10 20:53:51 发布