結果
問題 |
No.250 atetubouのzetubou
|
ユーザー |
![]() |
提出日時 | 2017-11-23 21:14:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 904 bytes |
コンパイル時間 | 611 ms |
コンパイル使用メモリ | 82,776 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-27 05:57:50 |
合計ジャッジ時間 | 4,591 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | RE * 20 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <cstring> #include <math.h> #include <cmath> #include <limits.h> #include <map> #include <set> #include <queue> #include <algorithm> #include <functional> #include <stdio.h> using namespace std; long long MOD = 1000000007; int main() { int Q; cin >> Q; int D,X; long long T; vector<string> ans; for ( int i = 0; i < Q; i++ ) { cin >> D >> X >> T; long long a = 1, b = 1; if ( D == 1 ) { a = 1; } else { for ( int j = 1; j < D; j++ ) { a *= X+j; b *= j; if ( a / b > T ) { break; } } a /= b; } ans.push_back( ( a <= T ) ? "AC" : "ZETUBOU" ); } for ( int i = 0; i < Q; i++ ) { cout << ans[i] << endl; } return 0; }