結果

問題 No.250 atetubouのzetubou
ユーザー hotpepsihotpepsi
提出日時 2016-09-03 02:00:24
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 488 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 58,572 KB
実行使用メモリ 73,688 KB
最終ジャッジ日時 2024-04-27 15:07:28
合計ジャッジ時間 1,966 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
72,108 KB
testcase_01 AC 21 ms
72,116 KB
testcase_02 AC 40 ms
72,996 KB
testcase_03 AC 41 ms
72,568 KB
testcase_04 AC 41 ms
73,616 KB
testcase_05 AC 44 ms
72,652 KB
testcase_06 AC 38 ms
72,440 KB
testcase_07 AC 30 ms
72,664 KB
testcase_08 AC 38 ms
73,160 KB
testcase_09 AC 34 ms
72,352 KB
testcase_10 AC 40 ms
72,736 KB
testcase_11 AC 34 ms
72,816 KB
testcase_12 AC 38 ms
72,252 KB
testcase_13 AC 29 ms
73,412 KB
testcase_14 AC 20 ms
72,220 KB
testcase_15 AC 41 ms
73,040 KB
testcase_16 AC 40 ms
72,868 KB
testcase_17 AC 41 ms
72,308 KB
testcase_18 AC 39 ms
72,536 KB
testcase_19 AC 41 ms
73,688 KB
testcase_20 AC 19 ms
72,336 KB
testcase_21 AC 20 ms
72,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>

#define COMBSZ 3002

using namespace std;
typedef long long LL;

int main(int argc, char *argv[]) {
	static LL C[COMBSZ][COMBSZ];
	for (LL i = 0; i < COMBSZ; ++i) {
		C[i][0] = 1;
		for (LL j = 1; j <= i; ++j) {
			LL c = C[i - 1][j - 1] + C[i - 1][j];
			C[i][j] = min(c, 1LL << 50);
		}
	}

	LL Q, D, X, T;
	cin >> Q;
	while (Q--) {
		cin >> D >> X >> T;
		LL a = C[X + D - 1][X];
		cout << (a <= T ? "AC" : "ZETUBOU") << endl;
	}
	return 0;
}
0