結果

問題 No.250 atetubouのzetubou
コンテスト
ユーザー fumiphys
提出日時 2018-07-06 18:40:39
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 550 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 355 ms
コンパイル使用メモリ 79,648 KB
実行使用メモリ 21,368 KB
最終ジャッジ日時 2026-03-21 19:53:42
合計ジャッジ時間 1,895 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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