結果

問題 No.250 atetubouのzetubou
ユーザー 沙耶花沙耶花
提出日時 2022-03-17 20:59:11
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 55 ms / 5,000 ms
コード長 599 bytes
コンパイル時間 3,705 ms
コンパイル使用メモリ 254,748 KB
実行使用メモリ 85,608 KB
最終ジャッジ日時 2024-04-09 19:46:29
合計ジャッジ時間 5,547 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
84,620 KB
testcase_01 AC 33 ms
84,564 KB
testcase_02 AC 52 ms
84,524 KB
testcase_03 AC 55 ms
84,312 KB
testcase_04 AC 49 ms
84,988 KB
testcase_05 AC 50 ms
84,972 KB
testcase_06 AC 46 ms
84,668 KB
testcase_07 AC 39 ms
84,636 KB
testcase_08 AC 49 ms
84,956 KB
testcase_09 AC 45 ms
84,556 KB
testcase_10 AC 51 ms
84,876 KB
testcase_11 AC 44 ms
84,208 KB
testcase_12 AC 47 ms
84,440 KB
testcase_13 AC 38 ms
84,328 KB
testcase_14 AC 29 ms
85,040 KB
testcase_15 AC 48 ms
84,540 KB
testcase_16 AC 50 ms
85,608 KB
testcase_17 AC 49 ms
84,624 KB
testcase_18 AC 48 ms
85,096 KB
testcase_19 AC 48 ms
84,320 KB
testcase_20 AC 31 ms
84,768 KB
testcase_21 AC 30 ms
84,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint1000000007;
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define Inf 1000000000000005

long long dp[3005][3505];	

int main(){
	dp[0][0] = 1;
	rep(i,3004){
		rep(j,3004){
			if(dp[i][j]){
				dp[i+1][j] = min((long long)Inf,dp[i][j]+dp[i+1][j]);
				dp[i+1][j+1] = min((long long)Inf,dp[i][j]+dp[i+1][j+1]);
			}
		}
	}
	int q;
	cin>>q;
	rep(_,q){
		long long D,X,T;
		cin>>D>>X>>T;
		if(dp[D+X-1][D-1]<=T)cout<<"AC"<<endl;
		else cout<<"ZETUBOU"<<endl;
	}
		
	return 0;
}
0