結果

問題 No.250 atetubouのzetubou
ユーザー hirokazu1020hirokazu1020
提出日時 2015-07-24 22:59:45
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 778 bytes
コンパイル時間 553 ms
コンパイル使用メモリ 75,956 KB
実行使用メモリ 21,092 KB
最終ジャッジ日時 2023-09-22 22:45:51
合計ジャッジ時間 2,060 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
20,964 KB
testcase_01 AC 12 ms
21,088 KB
testcase_02 AC 29 ms
20,992 KB
testcase_03 AC 32 ms
21,016 KB
testcase_04 AC 29 ms
20,880 KB
testcase_05 AC 30 ms
21,020 KB
testcase_06 AC 25 ms
20,832 KB
testcase_07 AC 18 ms
21,092 KB
testcase_08 AC 28 ms
20,952 KB
testcase_09 AC 24 ms
20,948 KB
testcase_10 AC 30 ms
20,944 KB
testcase_11 AC 22 ms
20,876 KB
testcase_12 AC 28 ms
21,032 KB
testcase_13 AC 19 ms
20,960 KB
testcase_14 AC 9 ms
20,880 KB
testcase_15 AC 30 ms
20,964 KB
testcase_16 AC 30 ms
20,828 KB
testcase_17 AC 30 ms
20,856 KB
testcase_18 AC 30 ms
21,004 KB
testcase_19 AC 31 ms
20,980 KB
testcase_20 AC 9 ms
20,848 KB
testcase_21 AC 9 ms
20,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<sstream>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
using namespace std;

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())
#define indexOf(v,x) (find(all(v),x)-v.begin())

#define INF (1LL<<50)

long long dp[1501][1501];

int main(){
	dp[0][0]=1;
	rep(i,1500){
		long long s=0;
		rep(j,1501){
			s=min(s+dp[i][j],INF);
			dp[i+1][j]=s;
		}
	}
	int q;
	cin>>q;
	rep(i,q){
		int d,x;
		long long t;
		cin>>d>>x>>t;
		if(dp[d][x]<=t)cout<<"AC"<<endl;
		else cout<<"ZETUBOU"<<endl;
	}
	return 0;
}
0