Submission #19740

# Submission time Handle Problem Language Result Execution time Memory
19740 2016-02-25T05:10:40 Z jihoon 동전 (kriii4_E) C++
100 / 100
165 ms 263228 KB
#include<cstdio>
#define je 1000000007;
long long bae[256][512][256];

int main(){
    int n,coverage=1,cal;
    scanf("%d",&n);
    bae[0][0][0]=1;
    for(int i=0;i<n;i++){
        for(int j=0;j<=511;j++){
            for(int k=0;k<=i;k++){
                bae[i+1][j][0]+=bae[i][j][k];
                bae[i+1][j][0]%=je;
                cal=j;
                cal^=k;cal^=k+1;
                bae[i+1][cal][k+1]+=bae[i][j][k];
                bae[i+1][cal][k+1]%=je;
            }
        }
    }
    for(int j=1;j<=n;j++){
        bae[n][0][0]+=bae[n][0][j];
        bae[n][0][0]%=je;
    }
    printf("%d",bae[n][0][0]);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 263228 KB Output is correct
2 Correct 0 ms 263228 KB Output is correct
3 Correct 0 ms 263228 KB Output is correct
4 Correct 0 ms 263228 KB Output is correct
5 Correct 1 ms 263228 KB Output is correct
6 Correct 1 ms 263228 KB Output is correct
7 Correct 0 ms 263228 KB Output is correct
8 Correct 0 ms 263228 KB Output is correct
9 Correct 0 ms 263228 KB Output is correct
10 Correct 0 ms 263228 KB Output is correct
11 Correct 0 ms 263228 KB Output is correct
12 Correct 0 ms 263228 KB Output is correct
13 Correct 3 ms 263228 KB Output is correct
14 Correct 0 ms 263228 KB Output is correct
15 Correct 0 ms 263228 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 33 ms 263228 KB Output is correct
2 Correct 51 ms 263228 KB Output is correct
3 Correct 0 ms 263228 KB Output is correct
4 Correct 19 ms 263228 KB Output is correct
5 Correct 0 ms 263228 KB Output is correct
6 Correct 34 ms 263228 KB Output is correct
7 Correct 95 ms 263228 KB Output is correct
8 Correct 117 ms 263228 KB Output is correct
9 Correct 23 ms 263228 KB Output is correct
10 Correct 128 ms 263228 KB Output is correct
11 Correct 21 ms 263228 KB Output is correct
12 Correct 12 ms 263228 KB Output is correct
13 Correct 105 ms 263228 KB Output is correct
14 Correct 67 ms 263228 KB Output is correct
15 Correct 46 ms 263228 KB Output is correct
16 Correct 3 ms 263228 KB Output is correct
17 Correct 165 ms 263228 KB Output is correct
18 Correct 0 ms 263228 KB Output is correct
19 Correct 67 ms 263228 KB Output is correct
20 Correct 7 ms 263228 KB Output is correct
21 Correct 92 ms 263228 KB Output is correct
22 Correct 66 ms 263228 KB Output is correct
23 Correct 41 ms 263228 KB Output is correct
24 Correct 25 ms 263228 KB Output is correct
25 Correct 8 ms 263228 KB Output is correct
26 Correct 0 ms 263228 KB Output is correct
27 Correct 93 ms 263228 KB Output is correct
28 Correct 8 ms 263228 KB Output is correct
29 Correct 96 ms 263228 KB Output is correct
30 Correct 161 ms 263228 KB Output is correct