結果

問題 No.250 atetubouのzetubou
ユーザー ishizuishizu
提出日時 2015-07-31 14:09:47
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 940 bytes
コンパイル時間 472 ms
コンパイル使用メモリ 69,448 KB
実行使用メモリ 50,004 KB
最終ジャッジ日時 2023-09-24 22:27:34
合計ジャッジ時間 3,047 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 56 ms
49,668 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 67 ms
49,804 KB
testcase_21 AC 59 ms
49,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>

#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<functional>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define INF 1<<30
#define MP make_pair
#define mp make_pair
#define pb push_back
#define PB push_back
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define ll long long
#define ull unsigned long long
const ll N_MAX =1e15;
ll dp[3010][3010];

int main(){
cin.tie(0);
ios::sync_with_stdio(false);
	 dp[0][0]=1;
	 FOR(i,1,3010){
		REP(j,i+1){
			if(j>=1) dp[i][j] +=dp[i-1][j-1];
			dp[i][j] += dp[i-1][j];
			if(dp[i][j] > N_MAX) dp[i][j]=1e16;
		}
	 }

	 int Q;cin>>Q;
	 REP(i,Q){
		int D,X,T;cin>>D>>X>>T;
		if(dp[D+X-1][D-1] <= T) cout<<"AC"<<endl;
		else cout<<"ZETUBOU"<<endl;
	 }
 

}
0