結果

問題 No.250 atetubouのzetubou
ユーザー honake
提出日時 2016-10-20 19:50:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 1,824 bytes
コンパイル時間 2,401 ms
コンパイル使用メモリ 106,332 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-22 16:44:11
合計ジャッジ時間 2,030 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 1 WA * 19
権限があれば一括ダウンロードができます

ソースコード

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;

//
// Your code goes here
//
string judge(ull n, ull k, ull t) {
    ull sum = 1;
    for(ll i=n;i>n-k;i--){
        sum *= i;
        if(sum>t){
            return "ZETUBOU";
        }
    }
    return "AC";
}

int main() {
  ull n,a;
  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