結果
問題 |
No.1011 Infinite Stairs
|
ユーザー |
![]() |
提出日時 | 2020-03-20 22:14:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 683 bytes |
コンパイル時間 | 1,105 ms |
コンパイル使用メモリ | 81,820 KB |
実行使用メモリ | 77,476 KB |
最終ジャッジ日時 | 2024-12-15 06:17:42 |
合計ジャッジ時間 | 24,227 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 TLE * 4 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <stdio.h> #include <queue> #include <stack> #include <climits> #include <map> #include <set> using namespace std; typedef long long ll; typedef pair<int, int> P; const ll mod = 1000000007; const int inf = 1e9; const long long INF = 1LL << 60; ll dp[310][90400]; int main() { int n,d,m; cin >> n >> d >> m; dp[0][0] = 1; for(int i = 0; i <= n; i++){ for(int j = 0; j <= m; j++){ for(int k = 1; k <= d; k++){ dp[i+1][j+k] += dp[i][j]; dp[i+1][j+k] %= mod; } } } cout << dp[n][m]; }