結果
問題 |
No.250 atetubouのzetubou
|
ユーザー |
|
提出日時 | 2016-10-20 19:43:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 2,111 bytes |
コンパイル時間 | 835 ms |
コンパイル使用メモリ | 106,776 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 16:42:27 |
合計ジャッジ時間 | 3,883 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | WA * 20 |
ソースコード
// C++ #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <unordered_map> #include <valarray> #include <vector> // // Iteration // #define REP(i, a, b) for (int i = a; i < (int)(b); i++) #define rep(i, n) REP(i, 0, n) #define each(x,v) for(auto&&x:v) // as if v.each // // Debug // #define dump(c) cerr << "> " << #c << " = " << (c) << endl; // // Vector // #define sort(v) sort(v.begin(), v.end()) // unique should be used with sort #define unique(v) unique(v.begin(), v.end()) - v.begin() #define lower_bound(v,x) lower_bound(v.begin(),v.end(), x); #define upper_bound(v,x) upper_bound(v.begin(),v.end(), x); // // Namespace // using namespace std; // // Type // typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<vi> vvi; typedef vector<double> vd; typedef vector<vd> vvd; typedef vector<string> vs; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1 << 30; const double EPS = 1e-10; static const double pi=3.1415926535897932; // // Your code goes here // unsigned long long choose(unsigned long long n, unsigned long long k) { if (k > n) { return 0; } unsigned long long r = 1; for (unsigned long long d = 1; d <= k; ++d) { r *= n--; r /= d; } return r; } string solve(ull d, ull x, ull t){ if(choose(x+d-1,d-1) > t){ return "ZETUBOU"; }else{ return "AC"; } } int main() { ull n; cin >> n; rep(i, n) { ull d,x,t; cin >> d >> x >> t; cout << solve(d,x,t) << endl; } return 0; }