| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 19921 | king7282 | 괄호 (kriii4_R) | C++98 | 2000 ms | 24516 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
