結果

問題 No.250 atetubouのzetubou
ユーザー ishizuishizu
提出日時 2015-07-31 14:18:14
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 942 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 69,952 KB
実行使用メモリ 49,964 KB
最終ジャッジ日時 2023-09-24 22:27:39
合計ジャッジ時間 3,012 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
49,668 KB
testcase_01 AC 58 ms
49,672 KB
testcase_02 AC 71 ms
49,908 KB
testcase_03 AC 73 ms
49,752 KB
testcase_04 AC 71 ms
49,740 KB
testcase_05 AC 72 ms
49,760 KB
testcase_06 AC 69 ms
49,680 KB
testcase_07 AC 62 ms
49,964 KB
testcase_08 AC 70 ms
49,676 KB
testcase_09 AC 67 ms
49,808 KB
testcase_10 AC 71 ms
49,676 KB
testcase_11 AC 65 ms
49,680 KB
testcase_12 AC 71 ms
49,780 KB
testcase_13 AC 64 ms
49,792 KB
testcase_14 AC 56 ms
49,744 KB
testcase_15 AC 74 ms
49,680 KB
testcase_16 AC 73 ms
49,736 KB
testcase_17 AC 73 ms
49,676 KB
testcase_18 AC 74 ms
49,796 KB
testcase_19 AC 73 ms
49,676 KB
testcase_20 AC 56 ms
49,908 KB
testcase_21 AC 56 ms
49,956 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]=1e17;
		}
	 }

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

}
0