# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
409960 | 2021-05-21T19:50:38 Z | dolphingarlic | Chess Rush (CEOI20_chessrush) | C++14 | 1 ms | 204 KB |
#include <bits/stdc++.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 c; int x, y; cin >> c >> x >> y; switch (c) { 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 (x + y + r & 1) { if (r - x < y) ways++; if (r - c + x - 1 < y) 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 | 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 | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |