結果
問題 |
No.1011 Infinite Stairs
|
ユーザー |
|
提出日時 | 2020-03-20 21:46:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 326 bytes |
コンパイル時間 | 133 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 229,928 KB |
最終ジャッジ日時 | 2024-12-15 05:11:54 |
合計ジャッジ時間 | 64,696 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 TLE * 1 |
other | WA * 4 TLE * 20 |
ソースコード
mod = 10**9+7 n,d,k = map(int,input().split()) dp = [[0 for _ in range(k+1)] for _ in range(n+1)] dp[0][0] = 1 for i in range(n): for j in range(k+1): end = min(j+d,k) end -= j for p in range(end+1): dp[i+1][j+p] += dp[i][j]+1 dp[i+1][j+p] %= mod ans = dp[-1][-1] print(ans)