Submission #19006

#TimeUsernameProblemLanguageResultExecution timeMemory
19006kriii동전 (kriii4_E)C++14
100 / 100
12 ms1596 KiB
#include <stdio.h> const long long mod = 1000000007; void add(long long &a, long long b) { a = (a + b) % mod; } long long dyn[256][256]; int main() { int N; scanf ("%d",&N); N++; dyn[0][0] = 1; for (int i=0;i<N;i++) for (int x=0;x<256;x++) if (dyn[i][x]){ for (int k=1;i+k<=N;k++) add(dyn[i+k][x^(k-1)],dyn[i][x]); } printf ("%lld\n",dyn[N][0]); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...