Submission #966401

# Submission time Handle Problem Language Result Execution time Memory
966401 2024-04-19T19:52:41 Z anton Chess Rush (CEOI20_chessrush) C++17
0 / 100
1 ms 348 KB
#include<bits/stdc++.h>
#include "arithmetics.h"

using namespace std;
#define pii pair<int, int>
typedef complex<int> point;

signed main(){
    cin.tie(NULL);
    ios_base::sync_with_stdio(false);
    int r, c, q;
    cin>>r>>c>>q;

    for(int i = 0; i<q; i++){
        char p;
        cin>>p;
        int begin, dest;
        cin>>begin>>dest;
        if(p ==  'K'){
            int res= 1;
            int n = r-1;
            int k = abs(begin-dest);
            for(int i =n, j=k; i>n-k; i--, j--){
                res=  Mul(res, Div(i, j));
            }
            cout<<(k + r-1)<<" "<<res<<endl;
        }
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -