結果

問題 No.250 atetubouのzetubou
ユーザー femtofemto
提出日時 2016-01-16 18:12:00
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 648 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 60,576 KB
実行使用メモリ 198,892 KB
最終ジャッジ日時 2023-10-20 00:20:54
合計ジャッジ時間 4,914 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 156 ms
198,892 KB
testcase_16 AC 160 ms
198,892 KB
testcase_17 AC 156 ms
198,892 KB
testcase_18 AC 170 ms
198,892 KB
testcase_19 AC 136 ms
198,892 KB
testcase_20 AC 121 ms
198,888 KB
testcase_21 AC 122 ms
198,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef long long ll;
const int MAX = 5000;
const ll MOD = 1LL << 50;
ll c[MAX][MAX];

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	c[0][0] = 1;
	for(int i = 1; i < MAX; i++) {
		for(int j = 0; j < MAX; j++) {
			if(j == 0 || i == j) {
				c[i][j] = 1;
			}
			else {
				c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD;
			}
		}
	}

	ll q;
	cin >> q;
	for(int loop = 0; loop < q; loop++) {
		ll d, x, t;
		cin >> d >> x >> t;
		if(c[x + d - 1][d - 1] <= t) {
			cout << "AC" << endl;
		}
		else {
			cout << "ZETUBOU" << endl;
		}
	}
}

0