# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
19830 |
2016-02-25T06:05:18 Z |
xdoju |
동전 (kriii4_E) |
C++14 |
|
1000 ms |
1084 KB |
#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Correct |
0 ms |
1084 KB |
Output is correct |
3 |
Correct |
0 ms |
1084 KB |
Output is correct |
4 |
Correct |
0 ms |
1084 KB |
Output is correct |
5 |
Correct |
0 ms |
1084 KB |
Output is correct |
6 |
Correct |
0 ms |
1084 KB |
Output is correct |
7 |
Correct |
0 ms |
1084 KB |
Output is correct |
8 |
Correct |
0 ms |
1084 KB |
Output is correct |
9 |
Correct |
0 ms |
1084 KB |
Output is correct |
10 |
Correct |
0 ms |
1084 KB |
Output is correct |
11 |
Correct |
0 ms |
1084 KB |
Output is correct |
12 |
Correct |
0 ms |
1084 KB |
Output is correct |
13 |
Correct |
1 ms |
1084 KB |
Output is correct |
14 |
Correct |
2 ms |
1084 KB |
Output is correct |
15 |
Correct |
4 ms |
1084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
1084 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |