結果

問題 No.250 atetubouのzetubou
ユーザー fumiphysfumiphys
提出日時 2018-07-06 18:40:39
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 550 bytes
コンパイル時間 397 ms
コンパイル使用メモリ 59,352 KB
実行使用メモリ 21,280 KB
最終ジャッジ日時 2023-09-13 18:13:53
合計ジャッジ時間 2,310 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
20,980 KB
testcase_01 AC 11 ms
20,992 KB
testcase_02 AC 28 ms
20,916 KB
testcase_03 AC 32 ms
20,916 KB
testcase_04 AC 28 ms
20,896 KB
testcase_05 AC 30 ms
20,912 KB
testcase_06 AC 25 ms
20,980 KB
testcase_07 AC 18 ms
20,900 KB
testcase_08 AC 28 ms
20,940 KB
testcase_09 AC 24 ms
20,936 KB
testcase_10 AC 29 ms
20,992 KB
testcase_11 AC 22 ms
20,976 KB
testcase_12 AC 28 ms
20,924 KB
testcase_13 AC 19 ms
21,100 KB
testcase_14 AC 9 ms
21,040 KB
testcase_15 AC 29 ms
21,280 KB
testcase_16 AC 30 ms
21,244 KB
testcase_17 AC 30 ms
20,924 KB
testcase_18 AC 30 ms
20,896 KB
testcase_19 AC 30 ms
20,936 KB
testcase_20 AC 9 ms
21,204 KB
testcase_21 AC 9 ms
20,912 KB
権限があれば一括ダウンロードができます

ソースコード

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