結果
問題 | No.250 atetubouのzetubou |
ユーザー |
|
提出日時 | 2015-07-24 23:33:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 55 ms / 5,000 ms |
コード長 | 1,177 bytes |
コンパイル時間 | 511 ms |
コンパイル使用メモリ | 65,472 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 00:21:25 |
合計ジャッジ時間 | 2,015 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> using namespace std; long long INF = 10e15; long long fac(long long n){ long long ans = 1; while(n > 0){ ans *= n; n--; } return ans; } double Comb(long long n, long long k){ double ans = 1; //long long kk = k; if(n-k < k) k = n-k; for(long long i=1; i<=k; i++){ ans *= (n-i+1); ans /= i; } return ans; } int main(){ int N; cin >> N; for(int i=0; i<N; i++){ long long D, X, T; cin >> D >> X >> T; /* if(Comb(X+D-1, X, T)){ cout << "AC" << endl; }else{ cout << "ZETUBOU" << endl; } */ if(Comb(X+D-1, X) > T ){ // cout << Comb(X+D-1, X) << endl; cout << "ZETUBOU" << endl; } else{ // cout << Comb(X+D-1, X) << endl; cout << "AC" << endl; } } /* cout << Comb(5, 3) << endl; cout << Comb(4, 3) << endl; */ return 0; }