1066 图像过滤 (15 分)

//这道题利用c语言的输入输出才可AC,不然会一直超时
#include <stdio.h> int main(){ int m, n, a, b, c, k; scanf("%d %d %d %d %d", &m, &n, &a, &b, &c); while (m--){ for (int i = 0; i < n; i++){ scanf("%d", &k); if (k >= a && k <= b) k = c; if (i != 0) //补零输出,巧妙输出空格 printf(" %03d", k); else printf("%03d", k); } printf("\n"); } return 0; }

猜你喜欢

转载自www.cnblogs.com/Hk456/p/10743568.html