結果
問題 |
No.250 atetubouのzetubou
|
ユーザー |
|
提出日時 | 2018-05-13 14:51:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 668 bytes |
コンパイル時間 | 698 ms |
コンパイル使用メモリ | 64,512 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 10:00:45 |
合計ジャッジ時間 | 1,653 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 1 WA * 19 |
ソースコード
#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){ times = t+1; break; } } } if(times <= t) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } return 0; }