結果

問題 No.250 atetubouのzetubou
ユーザー fumiphys
提出日時 2018-07-06 18:40:39
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 550 bytes
コンパイル時間 486 ms
コンパイル使用メモリ 58,932 KB
実行使用メモリ 21,096 KB
最終ジャッジ日時 2024-07-01 02:52:00
合計ジャッジ時間 1,889 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
#define ll long long int

using namespace std;
const ll bound = 1e15 + 1;

ll dp[1501][1501];

int main(int argc, char const* argv[])
{
	int q;
	cin >> q;
	dp[0][0] = 1;
	for(int i = 0; i < 1500; i++){
			dp[i + 1][0] = 1;
			for(int j = 1; j <= 1500; j++){
					dp[i + 1][j] = min(dp[i + 1][j - 1] + dp[i][j], bound);
			}
	}
	for(int i = 0; i < q; i++){
			int d, x;
			ll t;
			cin >> d >> x >> t;
			if(t >= dp[d][x]){
					cout << "AC" << endl;
			}else{
					cout << "ZETUBOU" << endl;
			}
	}
	return 0;
}
0