結果
問題 |
No.250 atetubouのzetubou
|
ユーザー |
![]() |
提出日時 | 2017-02-13 18:26:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 993 bytes |
コンパイル時間 | 1,609 ms |
コンパイル使用メモリ | 158,440 KB |
実行使用メモリ | 27,008 KB |
最終ジャッジ日時 | 2024-12-29 18:55:12 |
合計ジャッジ時間 | 3,375 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<ll> VL; typedef vector<VL> VVL; typedef pair<int, int> PII; #define FOR(i, a, n) for (int i = (int)a; i < (int)n; ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) x.begin(), x.end() #define MOD 1000000007 #define INF 1000000000 #define PI 3.14159265359 #define EPS 1e-12 ll dp[2000][2000]; int main(void) { REP(i, 1505) dp[0][i] = i+1; REP(i, 1505) dp[i][0] = 1; FOR(i, 1, 1505) { FOR(j, 1, 1505) { if(dp[i][j-1] + dp[i-1][j] > 1000000000000000) dp[i][j] = 1000000000000001; else dp[i][j] = dp[i][j-1] + dp[i-1][j]; } } int q; cin >> q; REP(i, q) { ll d, x, t; cin >> d >> x >> t; //cout << dp[d-2][x-1] << " "; if(d == 1 && t >= 1) cout << "AC" << endl; else if(dp[d-2][x] > t) cout << "ZETUBOU" << endl; else if(dp[d-2][x] <= t) cout << "AC" << endl; else assert(false); } return 0; }