結果

問題 No.250 atetubouのzetubou
コンテスト
ユーザー 37kt_
提出日時 2015-09-10 17:51:30
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 50 ms / 5,000 ms
コード長 947 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 924 ms
コンパイル使用メモリ 177,576 KB
実行使用メモリ 251,804 KB
最終ジャッジ日時 2026-04-02 14:22:18
合計ジャッジ時間 2,650 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

// 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[3001][3001];

int main()
{
	dp[0][0] = 1;
	rep(i, 3000) rep(j, 3000){
		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