Submission #660734

# Submission time Handle Problem Language Result Execution time Memory
660734 2022-11-22T22:17:16 Z Lobo Chess Rush (CEOI20_chessrush) C++17
0 / 100
1 ms 212 KB
#include<bits/stdc++.h>
using namespace std;
const long long inf = (long long) 1e18 + 10;
const int inf1 = (int) 1e9 + 10;
#define int long long
#define dbl long double
#define endl '\n'
#define sc second
#define fr first
#define mp make_pair
#define pb push_back
#define all(x) x.begin(), x.end()

const int maxn = -1;
int R,C;
void solve() {
    char pc; int i,j;
    cin >> pc >> i >> j;
    if(pc == 'P') {
        if(i == j) cout << 1 << " " << 0 << endl;
        else cout << 0 << " " << 0 << endl;
    }
    if(pc == 'R') {
        if(i == j) {
            cout << 1 << " " << 1 << endl;
        }
        else {
            cout << 2 << " " << 2 << endl;
        }
    }
    if(pc == 'Q') {
        if(i == j || R-j == 1-i) {
            cout << 1 << " " << 1 << endl;
        }
        else {
            int ans = 3;
            if(((R-j)%2+2)%2 == ((1-i)%2+2)%2) ans+= 2;
            cout << 2 << " " << ans << endl;
        }
    }
}

int32_t main() {
    ios::sync_with_stdio(false); cin.tie(0);

    // freopen("in.in", "r", stdin);
    // freopen("out.out", "w", stdout);
    int tt = 1;
    cin >> R >> C;
    cin >> tt;
    while(tt--) {
        solve();
    }

}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -