結果

問題 No.250 atetubouのzetubou
ユーザー 37kt_37kt_
提出日時 2015-09-10 17:51:30
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 96 ms / 5,000 ms
コード長 947 bytes
コンパイル時間 1,201 ms
コンパイル使用メモリ 143,392 KB
実行使用メモリ 73,972 KB
最終ジャッジ日時 2023-09-26 10:25:58
合計ジャッジ時間 4,450 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
73,932 KB
testcase_01 AC 90 ms
73,776 KB
testcase_02 AC 93 ms
73,876 KB
testcase_03 AC 94 ms
73,712 KB
testcase_04 AC 93 ms
73,676 KB
testcase_05 AC 95 ms
73,800 KB
testcase_06 AC 96 ms
73,972 KB
testcase_07 AC 93 ms
73,840 KB
testcase_08 AC 96 ms
73,676 KB
testcase_09 AC 92 ms
73,772 KB
testcase_10 AC 93 ms
73,664 KB
testcase_11 AC 93 ms
73,740 KB
testcase_12 AC 92 ms
73,664 KB
testcase_13 AC 93 ms
73,716 KB
testcase_14 AC 90 ms
73,724 KB
testcase_15 AC 95 ms
73,816 KB
testcase_16 AC 95 ms
73,884 KB
testcase_17 AC 94 ms
73,756 KB
testcase_18 AC 95 ms
73,780 KB
testcase_19 AC 94 ms
73,712 KB
testcase_20 AC 90 ms
73,740 KB
testcase_21 AC 89 ms
73,676 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[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