結果

問題 No.250 atetubouのzetubou
ユーザー 158b158b
提出日時 2015-07-24 23:25:01
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 835 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 75,300 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-22 23:24:59
合計ジャッジ時間 2,108 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
4,380 KB
testcase_01 AC 4 ms
4,376 KB
testcase_02 AC 26 ms
4,376 KB
testcase_03 WA -
testcase_04 AC 25 ms
4,376 KB
testcase_05 AC 25 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 11 ms
4,376 KB
testcase_08 AC 24 ms
4,376 KB
testcase_09 AC 18 ms
4,384 KB
testcase_10 AC 26 ms
4,376 KB
testcase_11 AC 16 ms
4,376 KB
testcase_12 AC 24 ms
4,376 KB
testcase_13 AC 14 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <climits>
#include <vector>
#include <numeric>
#include <complex>
#include <map>
#include <bitset>
using namespace std;

#define __int64 long long
#define long __int64
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
const int Vecy[4] = {0,-1,0,1};
const int Vecx[4] = {1,0,-1,0};


int main(){
	int q;
	int d,x;
	long t;
	int maxd;
	long tester;
	cin >> q;
	rep(i,q){
		cin >> d >> x >> t;
		d --;
		//(d + x - 1)! <= d! * (x-1)! * t : ok
		maxd = max(d,x);		//maxの方を無効化
		int j;
		tester = 1;
		for(j = d + x; j>maxd; j--){
			tester *= j;
			tester /= (j - maxd);
			if(tester > t){
				break;
			}
		}
		
		if(j == maxd){
			cout << "AC" << endl;
		}else{
			cout << "ZETUBOU" << endl;
		}
	}
	
    return 0;
}
0