Submission #966401

#TimeUsernameProblemLanguageResultExecution timeMemory
966401antonChess Rush (CEOI20_chessrush)C++17
0 / 100
1 ms348 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...