# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
19006 | | kriii | 동전 (kriii4_E) | C++14 | | 12 ms | 1596 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>
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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |