Submission #19858

# Submission time Handle Problem Language Result Execution time Memory
19858 2016-02-25T06:20:39 Z Namnamseo 동전 (kriii4_E) C++14
100 / 100
49 ms 1340 KB
#include <cstdio>
int dp[256][256];
const int M=int(1e9)+7;
int main()
{
    int n;
    scanf("%d",&n);
    int i,j,k;
    dp[0][0]=1;
    for(i=1; i<=n; ++i){
        for(j=0; j<=n; ++j){
            dp[i][j]=dp[i-1][j];
            dp[i][j] += dp[0][j^i];
            dp[i][j] %= M;
            for(k=1; k<i; ++k){
                dp[i][j] += dp[i-k-1][j^k];
                dp[i][j] %= M;
            }
        }
    }
    printf("%d\n",dp[n][0]);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1340 KB Output is correct
2 Correct 0 ms 1340 KB Output is correct
3 Correct 0 ms 1340 KB Output is correct
4 Correct 0 ms 1340 KB Output is correct
5 Correct 0 ms 1340 KB Output is correct
6 Correct 0 ms 1340 KB Output is correct
7 Correct 0 ms 1340 KB Output is correct
8 Correct 0 ms 1340 KB Output is correct
9 Correct 0 ms 1340 KB Output is correct
10 Correct 0 ms 1340 KB Output is correct
11 Correct 0 ms 1340 KB Output is correct
12 Correct 0 ms 1340 KB Output is correct
13 Correct 0 ms 1340 KB Output is correct
14 Correct 0 ms 1340 KB Output is correct
15 Correct 0 ms 1340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 1340 KB Output is correct
2 Correct 15 ms 1340 KB Output is correct
3 Correct 0 ms 1340 KB Output is correct
4 Correct 0 ms 1340 KB Output is correct
5 Correct 0 ms 1340 KB Output is correct
6 Correct 4 ms 1340 KB Output is correct
7 Correct 28 ms 1340 KB Output is correct
8 Correct 38 ms 1340 KB Output is correct
9 Correct 3 ms 1340 KB Output is correct
10 Correct 36 ms 1340 KB Output is correct
11 Correct 3 ms 1340 KB Output is correct
12 Correct 2 ms 1340 KB Output is correct
13 Correct 29 ms 1340 KB Output is correct
14 Correct 17 ms 1340 KB Output is correct
15 Correct 6 ms 1340 KB Output is correct
16 Correct 0 ms 1340 KB Output is correct
17 Correct 47 ms 1340 KB Output is correct
18 Correct 0 ms 1340 KB Output is correct
19 Correct 14 ms 1340 KB Output is correct
20 Correct 1 ms 1340 KB Output is correct
21 Correct 23 ms 1340 KB Output is correct
22 Correct 16 ms 1340 KB Output is correct
23 Correct 9 ms 1340 KB Output is correct
24 Correct 5 ms 1340 KB Output is correct
25 Correct 2 ms 1340 KB Output is correct
26 Correct 0 ms 1340 KB Output is correct
27 Correct 32 ms 1340 KB Output is correct
28 Correct 0 ms 1340 KB Output is correct
29 Correct 27 ms 1340 KB Output is correct
30 Correct 49 ms 1340 KB Output is correct