# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19877 |
2016-02-25T06:30:59 Z |
king7282 |
괄호 (kriii4_R) |
C++14 |
|
0 ms |
8896 KB |
#include <stdio.h>
#define ll long long
#define M 1000000007
ll dp[1000010];
int main(void)
{
ll i, n, k;
scanf("%lld %lld", &n ,&k);
dp[1] = 1, dp[2] = 2;
for(i = 3; i <= n; i++)
{
dp[i] = (dp[i - 1] + dp[i - 2]) % M;
if(i % 2 == 0)
dp[i] = (dp[i] + 1) % M;
}
printf("%lld\n", dp[n]);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
8896 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |