結果
問題 |
No.1011 Infinite Stairs
|
ユーザー |
![]() |
提出日時 | 2020-03-22 19:07:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 359 bytes |
コンパイル時間 | 629 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 24,956 KB |
最終ジャッジ日時 | 2024-12-25 18:28:18 |
合計ジャッジ時間 | 51,069 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 TLE * 15 |
ソースコード
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: B[i+1]+=A[i] if i+d+1<=n*d: B[i+d+1]-=A[i] A[0]=0 for i in range(1,n*d+1): A[i]=(A[i-1]+B[i])%mod print(A[k])