結果

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

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef long long ll;
const int MAX = 5000;
const ll MOD = ll(1e9 + 7);
ll c[MAX][MAX];

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

	for(int i = 0; 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