# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
15321 |
2015-07-12T05:58:08 Z |
tonyjjw |
접미사 배열의 개수 (kriii3_W) |
C++ |
|
14 ms |
9052 KB |
#include<stdio.h>
int n,m;
long long int dp[1010][1010];
int mod=1000000007;
int main(){
int i,j;
scanf("%d%d",&n,&m);
for(i=1;i<=m;i++){
dp[1][i]=1;
}
for(j=2;j<=n;j++){
for(i=1;i<=m;i++){
dp[j][i]=dp[j-1][i]*i+dp[j-1][i-1]*(j-i);
dp[j][i]%=mod;
}
}
printf("%lld",dp[n][m]);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
9052 KB |
Output is correct |
2 |
Correct |
0 ms |
9052 KB |
Output is correct |
3 |
Correct |
0 ms |
9052 KB |
Output is correct |
4 |
Correct |
0 ms |
9052 KB |
Output is correct |
5 |
Correct |
0 ms |
9052 KB |
Output is correct |
6 |
Correct |
0 ms |
9052 KB |
Output is correct |
7 |
Correct |
7 ms |
9052 KB |
Output is correct |
8 |
Correct |
6 ms |
9052 KB |
Output is correct |
9 |
Correct |
2 ms |
9052 KB |
Output is correct |
10 |
Correct |
4 ms |
9052 KB |
Output is correct |
11 |
Correct |
14 ms |
9052 KB |
Output is correct |
12 |
Correct |
0 ms |
9052 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
13 ms |
9048 KB |
Program hung waiting for input |
2 |
Halted |
0 ms |
0 KB |
- |