結果

問題 No.250 atetubouのzetubou
ユーザー irohasu_takaokairohasu_takaoka
提出日時 2019-02-18 21:06:18
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 882 bytes
コンパイル時間 1,345 ms
コンパイル使用メモリ 157,660 KB
実行使用メモリ 49,664 KB
最終ジャッジ日時 2024-04-16 22:42:30
合計ジャッジ時間 3,033 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<cstdio>
#include<bits/stdc++.h>
typedef long long int ll;
#define REP(i, n) for(int i = 0; i < (n); i++)
#define FOR_IN(i, a, b) for(int i = (a); i < (b); i++)
#define BETWEEN(x, a, b) ((x) >= (a) && (x) <= (b))
#define BIT(b, i) (((b) >> (i)) & 1)
#define LOG_F 1
#define LOG(...) if(LOG_F) fprintf(stderr, __VA_ARGS__)

using namespace std;

ll pow(int x, int n){
  return n == 0 ? 1 : x * pow(x, n - 1);
}


/*
q
d1 x1 t1

AC
ZETUBOU
 */
int q;
ll comb[3001][3001];

void create_comb_table(){
  int n = 3000;
  REP(i,n+1){
    comb[i][0] = 1;
    comb[i][i] = 1;
  }

  REP(i,n){
    REP(j,i){
      comb[i+1][j+1] = comb[i][j+1] + comb[i][j];
    }
  }
}


int main(){
  create_comb_table();
  cin>>q;
  REP(k,q){
    int d,x,t,T;
    cin>>d>>x>>t;
    T=comb[x+d-1][d-1];
    if(T>t){
      cout<<"ZETUBOU\n";
    } else {
      cout<<"AC\n";
    }
  }

  return 0;
}
0