# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19921 |
2016-02-25T07:16:55 Z |
king7282 |
괄호 (kriii4_R) |
C++ |
|
2000 ms |
24516 KB |
#include <stdio.h>
#define ll long long
#define M 1000000007
ll dp[1000010], sum[2][1000010];
int main(void)
{
ll i, n, k;
scanf("%lld %lld", &n ,&k);
dp[0] = 1, dp[1] = 1;
for(i = 2; i <= n; i++)
{
ll tmp = 0;
for(ll j = 0; j < i / 2; j++)
tmp = (tmp % M + dp[j] * dp[i - (j + 1) * 2] % M) % M;
dp[i] = (tmp + dp[i - 1]) % M;
}
printf("%lld\n", dp[n]);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2000 ms |
24516 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |