結果
| 問題 | No.1011 Infinite Stairs |
| コンテスト | |
| ユーザー |
kt_deeea
|
| 提出日時 | 2020-03-20 22:00:50 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 482 bytes |
| 記録 | |
| コンパイル時間 | 886 ms |
| コンパイル使用メモリ | 184,364 KB |
| 実行使用メモリ | 103,328 KB |
| 最終ジャッジ日時 | 2026-05-25 19:00:56 |
| 合計ジャッジ時間 | 4,629 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll dp[301][90001]; //dp[i][j]:=i回目の移動後、j段目にいる場合の数
const int MOD=1e9+7;
int main(){
int n,d,k; cin >> n >> d >> k;
dp[0][0]=1;
for(int i=1;i<=n;i++){
for(int j=0;j<k;j++){
for(int l=1;l<=d;l++){
dp[i][j+l]+=dp[i-1][j];
dp[i][j+l]%=MOD;
}
}
}
cout << dp[n][k] << endl;
return 0;
}
kt_deeea