結果
問題 |
No.250 atetubouのzetubou
|
ユーザー |
![]() |
提出日時 | 2016-01-11 00:02:32 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 423 bytes |
コンパイル時間 | 1,874 ms |
コンパイル使用メモリ | 159,552 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-19 16:02:21 |
合計ジャッジ時間 | 3,062 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 WA * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; long long y = 1e15; long long comb(long long a, long long b){ long long res = 1; for (int i = b - 1; i >= 0; i--){ res *= a - i; res /= b - i; if(res >= y) return y; } return res; } int main(){ int q; cin >> q; int d,x,t; for(int i = 0; i < q; i++){ cin >> d >> x >> t; if(comb(d+x-1,d-1) <= t) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } }