Submission #19830

#TimeUsernameProblemLanguageResultExecution timeMemory
19830xdoju동전 (kriii4_E)C++14
5 / 100
1000 ms1084 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...