結果
問題 | No.250 atetubouのzetubou |
ユーザー |
|
提出日時 | 2016-01-30 16:30:30 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 87 ms / 5,000 ms |
コード長 | 1,075 bytes |
コンパイル時間 | 815 ms |
コンパイル使用メモリ | 96,700 KB |
実行使用メモリ | 73,728 KB |
最終ジャッジ日時 | 2024-09-21 19:15:43 |
合計ジャッジ時間 | 4,145 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include <cstdio>#include <iostream>#include <sstream>#include <fstream>#include <iomanip>#include <algorithm>#include <cmath>#include <string>#include <vector>#include <list>#include <queue>#include <stack>#include <set>#include <map>#include <bitset>#include <numeric>#include <limits>#include <climits>#include <cfloat>#include <functional>using namespace std;const long long INF = LLONG_MAX / 4;void combination(int n, vector<vector<long long> >& comb){comb.assign(n+1, vector<long long>(n+1, 0));for(int i=0; i<=n; ++i){comb[i][0] = 1;for(int j=1; j<=i; ++j){comb[i][j] = comb[i-1][j-1] + comb[i-1][j];comb[i][j] = min(INF, comb[i][j]);}}}int main(){vector<vector<long long> > comb;combination(3000, comb);int q;cin >> q;while(--q >= 0){int d, x;long long t;cin >> d >> x >> t;if(comb[x+d-1][x] <= t)cout << "AC" << endl;elsecout << "ZETUBOU" << endl;}return 0;}