結果

問題 No.250 atetubouのzetubou
ユーザー honakehonake
提出日時 2016-10-20 19:56:28
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 2,044 bytes
コンパイル時間 917 ms
コンパイル使用メモリ 107,052 KB
実行使用メモリ 8,576 KB
最終ジャッジ日時 2024-05-02 05:40:55
合計ジャッジ時間 16,364 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 TLE -
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

// 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;
}
0