Submission #20090

# Submission time Handle Problem Language Result Execution time Memory
20090 2016-02-25T10:53:59 Z hongjun7 동전 (kriii4_E) C++
100 / 100
84 ms 1516 KB
#include <stdio.h>
int mod = 1e9 + 7;
int n, d[333][333];
int main() {
	scanf("%d", &n);
	d[0][0] = 1;
	for (int i = 0; i <= n; i++) for (int j = 0; j < 256; j++) {
		d[i + 1][j] = d[i][j];
		for (int k = 1; k <= i; k++) d[i + 1][j] = (d[i + 1][j] + d[i - k][j^k]) % mod;
	}
	printf("%d", d[n + 1][0]);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1516 KB Output is correct
2 Correct 0 ms 1516 KB Output is correct
3 Correct 0 ms 1516 KB Output is correct
4 Correct 0 ms 1516 KB Output is correct
5 Correct 0 ms 1516 KB Output is correct
6 Correct 0 ms 1516 KB Output is correct
7 Correct 0 ms 1516 KB Output is correct
8 Correct 0 ms 1516 KB Output is correct
9 Correct 0 ms 1516 KB Output is correct
10 Correct 0 ms 1516 KB Output is correct
11 Correct 0 ms 1516 KB Output is correct
12 Correct 0 ms 1516 KB Output is correct
13 Correct 0 ms 1516 KB Output is correct
14 Correct 0 ms 1516 KB Output is correct
15 Correct 0 ms 1516 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 1516 KB Output is correct
2 Correct 37 ms 1516 KB Output is correct
3 Correct 0 ms 1516 KB Output is correct
4 Correct 10 ms 1516 KB Output is correct
5 Correct 6 ms 1516 KB Output is correct
6 Correct 14 ms 1516 KB Output is correct
7 Correct 57 ms 1516 KB Output is correct
8 Correct 71 ms 1516 KB Output is correct
9 Correct 20 ms 1516 KB Output is correct
10 Correct 68 ms 1516 KB Output is correct
11 Correct 11 ms 1516 KB Output is correct
12 Correct 10 ms 1516 KB Output is correct
13 Correct 63 ms 1516 KB Output is correct
14 Correct 41 ms 1516 KB Output is correct
15 Correct 20 ms 1516 KB Output is correct
16 Correct 3 ms 1516 KB Output is correct
17 Correct 81 ms 1516 KB Output is correct
18 Correct 3 ms 1516 KB Output is correct
19 Correct 36 ms 1516 KB Output is correct
20 Correct 6 ms 1516 KB Output is correct
21 Correct 50 ms 1516 KB Output is correct
22 Correct 39 ms 1516 KB Output is correct
23 Correct 26 ms 1516 KB Output is correct
24 Correct 16 ms 1516 KB Output is correct
25 Correct 8 ms 1516 KB Output is correct
26 Correct 2 ms 1516 KB Output is correct
27 Correct 63 ms 1516 KB Output is correct
28 Correct 1 ms 1516 KB Output is correct
29 Correct 62 ms 1516 KB Output is correct
30 Correct 84 ms 1516 KB Output is correct