Submission #19992

# Submission time Handle Problem Language Result Execution time Memory
19992 2016-02-25T08:13:34 Z gs12117 동전 (kriii4_E) C++
100 / 100
89 ms 1348 KB
#include<stdio.h>
int n;
int mod=1000000007;
int dp[260][260];
int main(){
	int i,j,k;
	scanf("%d",&n);
	dp[0][0]=1;
	for(i=0;i<=n;i++){
		for(j=0;j<256;j++){
			dp[i+1][j]=dp[i][j]%mod;
			for(k=1;k<=i;k++){
				dp[i+1][j]+=dp[i-k][j^k]%mod;
				dp[i+1][j]%=mod;
			}
		}
	}
	printf("%d",dp[n+1][0]);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1348 KB Output is correct
2 Correct 0 ms 1348 KB Output is correct
3 Correct 0 ms 1348 KB Output is correct
4 Correct 0 ms 1348 KB Output is correct
5 Correct 0 ms 1348 KB Output is correct
6 Correct 0 ms 1348 KB Output is correct
7 Correct 0 ms 1348 KB Output is correct
8 Correct 0 ms 1348 KB Output is correct
9 Correct 0 ms 1348 KB Output is correct
10 Correct 0 ms 1348 KB Output is correct
11 Correct 0 ms 1348 KB Output is correct
12 Correct 0 ms 1348 KB Output is correct
13 Correct 0 ms 1348 KB Output is correct
14 Correct 0 ms 1348 KB Output is correct
15 Correct 0 ms 1348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 1348 KB Output is correct
2 Correct 40 ms 1348 KB Output is correct
3 Correct 0 ms 1348 KB Output is correct
4 Correct 11 ms 1348 KB Output is correct
5 Correct 3 ms 1348 KB Output is correct
6 Correct 15 ms 1348 KB Output is correct
7 Correct 61 ms 1348 KB Output is correct
8 Correct 71 ms 1348 KB Output is correct
9 Correct 22 ms 1348 KB Output is correct
10 Correct 68 ms 1348 KB Output is correct
11 Correct 12 ms 1348 KB Output is correct
12 Correct 11 ms 1348 KB Output is correct
13 Correct 68 ms 1348 KB Output is correct
14 Correct 44 ms 1348 KB Output is correct
15 Correct 21 ms 1348 KB Output is correct
16 Correct 4 ms 1348 KB Output is correct
17 Correct 86 ms 1348 KB Output is correct
18 Correct 3 ms 1348 KB Output is correct
19 Correct 38 ms 1348 KB Output is correct
20 Correct 7 ms 1348 KB Output is correct
21 Correct 54 ms 1348 KB Output is correct
22 Correct 42 ms 1348 KB Output is correct
23 Correct 24 ms 1348 KB Output is correct
24 Correct 18 ms 1348 KB Output is correct
25 Correct 9 ms 1348 KB Output is correct
26 Correct 3 ms 1348 KB Output is correct
27 Correct 67 ms 1348 KB Output is correct
28 Correct 2 ms 1348 KB Output is correct
29 Correct 67 ms 1348 KB Output is correct
30 Correct 89 ms 1348 KB Output is correct