結果

問題 No.250 atetubouのzetubou
ユーザー lapilapi
提出日時 2019-07-20 21:08:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,073 bytes
コンパイル時間 2,976 ms
コンパイル使用メモリ 106,840 KB
実行使用メモリ 72,840 KB
最終ジャッジ日時 2023-08-28 22:31:21
合計ジャッジ時間 3,024 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 41 ms
72,536 KB
testcase_16 AC 40 ms
72,560 KB
testcase_17 AC 41 ms
72,564 KB
testcase_18 AC 40 ms
72,680 KB
testcase_19 AC 40 ms
72,608 KB
testcase_20 AC 24 ms
72,532 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <numeric>
#include <regex>
#include <tuple>
#include <iomanip>
#include <cmath>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
#define MOD 1000000007 // 10^9 + 7
#define INF 1000000000 // 10^9
#define LLINF 1LL<<60

// combination_table
// パスカルの三角形
ll Com[3009][3009]; // C[n][k] = nCk

void combination_table(int N) {
	for (int i = 1; i <= N; i++) {
		for (int j = 0; j <= i; j++) {
			if (j == 0 || j == i) Com[i][j] = 1LL;
			else Com[i][j] = Com[i - 1][j] + Com[i - 1][j - 1];
		}
	}
}

int D[10009];
int X[10009];
ll T[10009];

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

	int Q; cin >> Q;
	for (int i = 1; i <= Q; i++) cin >> D[i] >> X[i] >> T[i];

	combination_table(3002);
	//cout << "ok2" << endl;

	for (int i = 1; i <= Q; i++) {
		if (Com[X[i] + D[i] - 1][X[i]] <= T[i]) cout << "AC" << endl;
		else cout << "ZETUBOU" << endl;
	}


	return 0;
}
0