# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
420675 | 2021-06-08T13:16:46 Z | Pyqe | MalnaRISC (COI21_malnarisc) | C++14 | 1 ms | 224 KB |
#include <bits/stdc++.h> using namespace std; long long n,nn; void ad(long long x,long long w) { if(x+(1ll<<w)<n) { printf(" R%lld R%lld",x+1,x+(1ll<<w)+1); } } int main() { long long i,j,r,c=0; scanf("%lld",&n); for(nn=1;nn<n;nn*=2,c++); printf("%lld\n",c*(c+1)/2); for(i=1;1ll<<i<=nn;i++) { printf("CMPSWP"); for(j=0;j<nn;j++) { if(!(j>>i-1&1)) { ad(j,i-1); } } printf("\n"); for(j=i-2;j+1;j--) { printf("CMPSWP"); for(r=0;r<nn;r++) { if(!((r^r+(1ll<<j))>>i&1)&&(r>>j&1)) { ad(r,j); } } printf("\n"); } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 224 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Token "R3" doesn't correspond to pattern "CMPSWP" |