結果
| 問題 | No.250 atetubouのzetubou | 
| コンテスト | |
| ユーザー |  zaichu | 
| 提出日時 | 2016-01-11 00:03:47 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 73 ms / 5,000 ms | 
| コード長 | 435 bytes | 
| コンパイル時間 | 1,393 ms | 
| コンパイル使用メモリ | 158,044 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-19 16:02:25 | 
| 合計ジャッジ時間 | 2,754 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 20 | 
ソースコード
#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;
	long long d,x,t;
	for(long long i = 0; i < q; i++){
		cin >> d >> x >> t;
		if(comb(d+x-1,d-1) <= t) cout << "AC" << endl;
		else cout << "ZETUBOU" << endl;
	}
}
            
            
            
        