結果
| 問題 |
No.1011 Infinite Stairs
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2020-03-21 03:46:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 278 bytes |
| コンパイル時間 | 86 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 236,160 KB |
| 最終ジャッジ日時 | 2024-12-16 07:31:03 |
| 合計ジャッジ時間 | 42,836 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 TLE * 13 |
ソースコード
N,d,K=map(int,input().split())
mod=10**9+7
DP=[[0]*(K+d+2) for i in range(N+1)]
DP[0][0]=1
for i in range(N):
for j in range(K+1):
DP[i+1][j+1]+=DP[i][j]
DP[i+1][j+1+d]-=DP[i][j]
DP[i+1][j+1]+=DP[i+1][j]
DP[i+1][j+1]%=mod
print(DP[N][K])
titia