結果
問題 | No.250 atetubouのzetubou |
ユーザー |
![]() |
提出日時 | 2016-02-20 18:08:44 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 41 ms / 5,000 ms |
コード長 | 796 bytes |
コンパイル時間 | 564 ms |
コンパイル使用メモリ | 69,776 KB |
実行使用メモリ | 21,120 KB |
最終ジャッジ日時 | 2024-09-22 12:27:31 |
合計ジャッジ時間 | 2,045 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <map> using namespace std; #define RREP(i,s,e) for (i = e-1; i >= s; i--) #define rrep(i,n) RREP(i,0,n) #define REP(i,s,e) for (i = s; i < e; i++) #define rep(i,n) REP(i,0,n) #define INF 1e8 int main() { int i, j, q; vector<vector<long long>> dp(1501); rep (i,1501) dp[i].resize(1501); dp[0][0] = 1; REP (i,1,1501) { long long sum = 0; rep (j,1501) { dp[i][j] = min((long long)1e15+1,dp[i-1][j] + sum); sum = dp[i][j]; } } cin >> q; rep (i,q) { int d,x; long long t; cin >> d >> x >> t; if (dp[d][x] <= t) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } return 0; }