# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
19830 | | xdoju | 동전 (kriii4_E) | C++14 | | 1000 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
int p[20];
int main(){
int N; scanf("%d", &N);
int ans = 0;
for(int st = 0; st < (1 << N); st++){
for(int i = 0, tst = st; i < N; i++){
p[i] = tst % 2; tst /= 2;
}
int v = 0, c = 0;
for(int i = 0; i < N; i++){
if(p[i] == 0){ v ^= c; c = 0; }
else c++;
}
v ^= c;
if(v == 0) ans++;
}
printf("%d\n", ans);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |