結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-13 14:47:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 656 bytes |
| コンパイル時間 | 597 ms |
| コンパイル使用メモリ | 64,512 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 10:00:41 |
| 合計ジャッジ時間 | 1,827 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 11 |
ソースコード
#include<iostream>
using namespace std;
typedef long long ll;
int main(){
int q;
cin >> q;
ll d,x,t,times;
while(q-- > 0){
cin >> d >> x >> t;
times = 1;
if(d != 1){
d--;
if(d > x) swap(d,x);
ll top = x+d;
ll bottom = d;
for(ll i = 1; i <= bottom; i++){
times *= (top-- / i);
if(times > 1e15){
times = t+1;
break;
}
}
}
if(times <= t) cout << "AC" << endl;
else cout << "ZETUBOU" << endl;
}
return 0;
}