結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
irohasu_takaoka
|
| 提出日時 | 2019-02-18 21:08:15 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 890 bytes |
| コンパイル時間 | 1,327 ms |
| コンパイル使用メモリ | 158,364 KB |
| 実行使用メモリ | 73,812 KB |
| 最終ジャッジ日時 | 2024-10-08 04:59:20 |
| 合計ジャッジ時間 | 3,002 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 5 WA * 15 |
ソースコード
#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;
ll 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;
}
irohasu_takaoka