Submission #1837861
Source Code Expand
#include "bits/stdc++.h" using namespace std; int a[1000][1000]; int main() { int r, c, d; cin >> r >> c >> d; rep(y, r) rep(x, c) scanf("%d", &a[y][x]); int ans = 0; rep(y, min(r, d + 1)) { rep(x, min(c, d - y + 1)) { if (d % 2 == 1 && (y + x) % 2 == 0) continue; if (d % 2 == 0 && (y + x) % 2 == 1) continue; ans = max(ans, a[y][x]); } } cout << ans << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - 謎の人物X |
User | fushime2 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 485 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:10:9: error: ‘y’ was not declared in this scope rep(y, r) rep(x, c) scanf("%d", &a[y][x]); ^ ./Main.cpp:10:13: error: ‘rep’ was not declared in this scope rep(y, r) rep(x, c) scanf("%d", &a[y][x]); ^