# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
409970 | 2021-05-21T19:59:28 Z | dolphingarlic | Chess Rush (CEOI20_chessrush) | C++14 | 1 ms | 332 KB |
#include <bits/stdc++.h> #include "arithmetics.h" typedef long long ll; using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); int r, c, q; cin >> r >> c >> q; while (q--) { char p; int x, y; cin >> p >> x >> y; switch (p) { case 'P': if (x == y) cout << r - 1 << " 1\n"; else cout << "0 0\n"; break; case 'R': if (x == y) cout << "1 1\n"; else cout << "2 2\n"; break; case 'Q': if (x == y || x + r - 1 == y || x - r + 1 == y) cout << "1 1\n"; else { int ways = 4; if (r == c && (y == 1 || y == r || x == 1 || x == r)) ways++; if (x + y + r & 1) { if (r - x < y) ways++; if (r - c + x - 1 < c - y + 1) ways++; } cout << "2 " << ways << '\n'; } break; case 'B': // Not yet implemented cout << "NYI\n"; break; case 'K': // Not yet implemented cout << "NYI\n"; break; } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 332 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |