PAT (Basic Level) Practice 1066 图像过滤 C语言
2020-07-30 15:21
176 查看
//1066 图像过滤 #include <stdio.h> int main(int argc, char const *argv[]) { int M, N, A, B, c; scanf("%d %d %d %d %d", &M, &N, &A, &B, &c); int pic[M][N]; for(int i = 0; i < M; ++i){ for(int j = 0; j < N; ++j){ scanf("%d", &pic[i][j]); if(pic[i][j] <= B && pic[i][j] >= A) pic[i][j] = c; } } for(int i = 0; i < M; ++i){ for(int j = 0; j < N; ++j){ if(j == 0) printf("%03d", pic[i][j]); else if(j == N - 1) printf(" %03d\n", pic[i][j]); else printf(" %03d", pic[i][j]); } } return 0; }
相关文章推荐
- PAT (Basic Level) Practice (中文)1066 图像过滤(C语言)
- PAT (Basic Level) Practice (中文)1066 图像过滤 (15 分)
- PAT (Basic Level) Practise (中文) 1066. 图像过滤(15)
- PAT (Basic Level) 1066 图像过滤
- PAT (Basic Level) 1066 图像过滤
- PAT (Basic Level) Practise (中文)1066. 图像过滤(15)
- PAT (Basic Level) Practice (中文)1079 延迟的回文数(C语言)
- PAT (Basic Level) Practice (中文)1060 爱丁顿数(C语言)
- (PAT (Basic Level) Practice (中文)1058 选择题(C语言)
- PAT (Basic Level) Practice (中文)1067 试密码(C语言)
- PAT (Basic Level) Practice (中文)1072 开学寄语(C语言)
- PAT (Basic Level) Practice (中文)1073 多选题常见计分法 (C语言)
- PAT (Basic Level) Practice (中文)1077 互评成绩计算(C语言)
- PAT (Basic Level) Practice (中文)1080 MOOC期终成绩(C语言)
- PAT (Basic Level) Practice (中文)1085 PAT单位排行(C语言)
- PAT (Basic Level) Practice (中文)1063 计算谱半径(C语言)
- PAT (Basic Level) Practice 1028 人口普查(20)(C语言实现)
- PAT (Basic Level) Practice (中文)1061 判断题(C语言)
- PAT (Basic Level) Practice 1029 旧键盘(20)(C语言实现)
- PAT (Basic Level) Practice (中文)1074 宇宙无敌加法器(C语言)