結果
| 問題 | No.250 atetubouのzetubou |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-20 19:56:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,044 bytes |
| コンパイル時間 | 1,157 ms |
| コンパイル使用メモリ | 107,172 KB |
| 実行使用メモリ | 8,576 KB |
| 最終ジャッジ日時 | 2024-11-22 16:48:06 |
| 合計ジャッジ時間 | 78,041 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 WA * 12 TLE * 7 |
ソースコード
// 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;
#define MAX 10000
ull pascal(ull m, ull n)
{
ull ans[MAX];
ull i, j;
if (n > m) return 0;
if( (n == 0) || (m == n) ) return 1;
ans[0] = 1;
for (i = 1; i <= m; i ++)
{
for (j = 1; j <= n; j ++)
{
ans[j] = ans[j] + ans[j - 1];
}
}
return ans[n];
}
string judge(ull n, ull k, ull t) {
if(pascal(n,k)>t){
return "ZETUBOU";}
else{
return "AC";}
}
int main() {
ull n;
cin >> n;
rep(i, n) {
ull d,x,t;
cin >> d >> x >> t;
cout << judge(x+d-1,d-1,t) << endl;
}
return 0;
}