結果
| 問題 | No.250 atetubouのzetubou |
| コンテスト | |
| ユーザー |
chakku
|
| 提出日時 | 2015-09-17 03:16:02 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 851 bytes |
| 記録 | |
| コンパイル時間 | 552 ms |
| コンパイル使用メモリ | 78,624 KB |
| 実行使用メモリ | 86,564 KB |
| 最終ジャッジ日時 | 2026-04-02 14:56:34 |
| 合計ジャッジ時間 | 3,060 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge5_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 WA * 19 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
ll Q,D,X,T;
ll comb[4000][2000];
ll combination(ll n,ll r){
if(r<=0||n<r) return 0;
else if(comb[n][r]!=0) return comb[n][r];
else if(r==1) return comb[n][r]=n;
else{
comb[n][r]=0;
comb[n][r]+=combination(n-1,r);
if(comb[n][r]>T){
comb[n][r]=T+10;
return comb[n][r];
}else{
comb[n][r]+=combination(n-1,r-1);
}
if(comb[n][r]>T){
comb[n][r]=T+10;
}
return comb[n][r];
}
}
void solve(){
cin>>D>>X>>T;
if(combination(D+X-1,X)>T){
cout<<"ZETUBOU"<<endl;
}else{
cout<<"AC"<<endl;
}
return;
}
int main(){
cin>>Q;
for(int i=0;i<Q;i++){
solve();
}
return 0;
}
chakku