結果

問題 No.250 atetubouのzetubou
ユーザー 37kt_37kt_
提出日時 2015-09-10 17:49:29
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 948 bytes
コンパイル時間 1,697 ms
コンパイル使用メモリ 143,108 KB
実行使用メモリ 21,188 KB
最終ジャッジ日時 2023-09-26 10:25:52
合計ジャッジ時間 6,877 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 AC 24 ms
21,188 KB
testcase_21 AC 23 ms
21,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// BCC
/*
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#include <queue>
*/

// GCC
#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; i--)
#define each(i, c) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)
#define pb push_back
#define mp make_pair

typedef long long ll;

const int INF = 1 << 28;
const ll INFLL = 1ll << 56;

#define add(a, b) min(a + b, INFLL);

ll dp[1501][1501];

int main()
{
	dp[0][0] = 1;
	rep(i, 1500) rep(j, 1500){
		dp[i + 1][j] = add(dp[i + 1][j], dp[i][j]);
		dp[i + 1][j + 1] = add(dp[i + 1][j + 1], dp[i][j]);
	}
	
	int q;
	scanf("%d", &q);
	rep(i, q){
		int d, x;
		ll t;
		scanf("%d %d %lld", &d, &x, &t);
		ll s = dp[x + d - 1][d - 1];
		puts(s <= t ? "AC" : "ZETUBOU");
	}
}
0