結果

問題 No.250 atetubouのzetubou
ユーザー naimonon77
提出日時 2016-02-17 13:14:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 846 bytes
コンパイル時間 1,256 ms
コンパイル使用メモリ 158,052 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-22 07:27:39
合計ジャッジ時間 2,086 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#ifdef __unix__
#include <bits/stdc++.h>
#else
#include "bits\stdc++.h"
#endif
#include <vector>
#include <set>
#include <string>
#include <queue>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

ull pow(ull x,ull n) {
   ull res = 1;
   while(n > 0) {
      if(n&1) res = res * x;
      x = x * x;
      n >>= 1;
   }
   return res;
}

int main() {
  int i,j,k;
  int q;
  int d,x,t;
  ull tle = pow((ull)2,(ull)40);
  cin >> q;
  while(cin >> d >> x >> t) {
    ull a=1;
    for(i=0;i<x;i++) {
      a *= x+d-1-i;
      if(a > tle) goto end;
    }
    for(i=1;i<x+1;i++) {
      a /= i;
    }
  end:
    if(a > t) puts("ZETUBOU");
    else puts("AC");
  }
  return 0;
}
0