結果
| 問題 |
No.1011 Infinite Stairs
|
| コンテスト | |
| ユーザー |
takakin
|
| 提出日時 | 2020-03-22 18:34:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 324 bytes |
| コンパイル時間 | 802 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 182,912 KB |
| 最終ジャッジ日時 | 2024-12-25 16:12:32 |
| 合計ジャッジ時間 | 45,149 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 TLE * 12 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
n,d,k=map(int,input().split())
mod=10**9+7
A=[0]*(n*d+1)
A[0]=1
for _ in range(n):
B=[0]*(n*d+1)
for i in range(n*d+1):
if not A[i]:
continue
else:
for j in range(d):
if i+j<=n*d:
B[i+j+1]=(B[i+j+1]+A[i])%mod
A=B
print(A[k])
takakin