# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
19791 |
2016-02-25T05:41:19 Z |
tonyjjw |
동전 (kriii4_E) |
C++14 |
|
220 ms |
8896 KB |
//*
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<algorithm>
#include<vector>
#define all(A) (A).begin(), (A).end()
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int MN = 1000;
const ll mod = 1000000007;
int N;
ll D[MN][MN];
int main(){
scanf("%d",&N);
D[0][0]=1;
D[1][0]=D[1][1]=1;
for(int i=2;i<=N;i++)for(int j=0;j<MN;j++){
if(i==j){
D[i][j]++;
}
for(int k=0;k<i;k++){
D[i][j]+=D[i-k-1][j^k];
D[i][j]%=mod;
}
}
printf("%lld\n",D[N][0]);
return 0;
}
//*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
8896 KB |
Output is correct |
2 |
Correct |
0 ms |
8896 KB |
Output is correct |
3 |
Correct |
0 ms |
8896 KB |
Output is correct |
4 |
Correct |
0 ms |
8896 KB |
Output is correct |
5 |
Correct |
0 ms |
8896 KB |
Output is correct |
6 |
Correct |
0 ms |
8896 KB |
Output is correct |
7 |
Correct |
0 ms |
8896 KB |
Output is correct |
8 |
Correct |
0 ms |
8896 KB |
Output is correct |
9 |
Correct |
0 ms |
8896 KB |
Output is correct |
10 |
Correct |
0 ms |
8896 KB |
Output is correct |
11 |
Correct |
0 ms |
8896 KB |
Output is correct |
12 |
Correct |
0 ms |
8896 KB |
Output is correct |
13 |
Correct |
0 ms |
8896 KB |
Output is correct |
14 |
Correct |
0 ms |
8896 KB |
Output is correct |
15 |
Correct |
0 ms |
8896 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
51 ms |
8896 KB |
Output is correct |
2 |
Correct |
104 ms |
8896 KB |
Output is correct |
3 |
Correct |
5 ms |
8896 KB |
Output is correct |
4 |
Correct |
28 ms |
8896 KB |
Output is correct |
5 |
Correct |
17 ms |
8896 KB |
Output is correct |
6 |
Correct |
41 ms |
8896 KB |
Output is correct |
7 |
Correct |
153 ms |
8896 KB |
Output is correct |
8 |
Correct |
189 ms |
8896 KB |
Output is correct |
9 |
Correct |
57 ms |
8896 KB |
Output is correct |
10 |
Correct |
185 ms |
8896 KB |
Output is correct |
11 |
Correct |
32 ms |
8896 KB |
Output is correct |
12 |
Correct |
30 ms |
8896 KB |
Output is correct |
13 |
Correct |
174 ms |
8896 KB |
Output is correct |
14 |
Correct |
111 ms |
8896 KB |
Output is correct |
15 |
Correct |
56 ms |
8896 KB |
Output is correct |
16 |
Correct |
10 ms |
8896 KB |
Output is correct |
17 |
Correct |
213 ms |
8896 KB |
Output is correct |
18 |
Correct |
8 ms |
8896 KB |
Output is correct |
19 |
Correct |
93 ms |
8896 KB |
Output is correct |
20 |
Correct |
18 ms |
8896 KB |
Output is correct |
21 |
Correct |
136 ms |
8896 KB |
Output is correct |
22 |
Correct |
109 ms |
8896 KB |
Output is correct |
23 |
Correct |
73 ms |
8896 KB |
Output is correct |
24 |
Correct |
38 ms |
8896 KB |
Output is correct |
25 |
Correct |
21 ms |
8896 KB |
Output is correct |
26 |
Correct |
7 ms |
8896 KB |
Output is correct |
27 |
Correct |
174 ms |
8896 KB |
Output is correct |
28 |
Correct |
4 ms |
8896 KB |
Output is correct |
29 |
Correct |
171 ms |
8896 KB |
Output is correct |
30 |
Correct |
220 ms |
8896 KB |
Output is correct |