結果
| 問題 |
No.1011 Infinite Stairs
|
| コンテスト | |
| ユーザー |
atcoderbeginner
|
| 提出日時 | 2020-03-31 01:43:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 403 bytes |
| コンパイル時間 | 441 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 186,936 KB |
| 最終ジャッジ日時 | 2024-06-23 10:48:43 |
| 合計ジャッジ時間 | 9,478 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 |
| other | TLE * 1 -- * 23 |
ソースコード
# import module
import sys
import math
import numpy as np
n , d , k = map(int,input().split())
mod = 1000000000 + 7
dp = []
[ dp.append( [0] * (k+1 )) for _ in range(n+1)]
dp[0][0] = 1
for i in range(1,n+1):
for j in range(i-1,k+1):
for l in range(1,d+1):
if j + l <= k:
dp[i][j+l] += dp[i-1][j]
else:
break
print(dp[n][k] % mod)
atcoderbeginner