結果

問題 No.250 atetubouのzetubou
ユーザー かにかに
提出日時 2015-12-04 22:43:33
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 54 ms / 5,000 ms
コード長 934 bytes
コンパイル時間 1,184 ms
コンパイル使用メモリ 146,680 KB
実行使用メモリ 78,688 KB
最終ジャッジ日時 2023-10-12 14:33:11
合計ジャッジ時間 3,244 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
78,684 KB
testcase_01 AC 34 ms
78,420 KB
testcase_02 AC 51 ms
78,412 KB
testcase_03 AC 54 ms
78,492 KB
testcase_04 AC 51 ms
78,468 KB
testcase_05 AC 52 ms
78,624 KB
testcase_06 AC 47 ms
78,536 KB
testcase_07 AC 39 ms
78,412 KB
testcase_08 AC 49 ms
78,424 KB
testcase_09 AC 45 ms
78,384 KB
testcase_10 AC 51 ms
78,424 KB
testcase_11 AC 43 ms
78,476 KB
testcase_12 AC 49 ms
78,480 KB
testcase_13 AC 41 ms
78,488 KB
testcase_14 AC 31 ms
78,384 KB
testcase_15 AC 52 ms
78,688 KB
testcase_16 AC 52 ms
78,484 KB
testcase_17 AC 51 ms
78,468 KB
testcase_18 AC 51 ms
78,392 KB
testcase_19 AC 51 ms
78,388 KB
testcase_20 AC 30 ms
78,492 KB
testcase_21 AC 30 ms
78,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define rep(i,n) for(int i = 0;i < n;i++)
#define REP(i,n,k) for(int i = n;i < k;i++)
#define P(p) cout<<(p)<<endl;
#define pi 3.1415926535
using namespace std;
typedef long long ll;
int dx[] = { 0, 1, 0, -1 };
int dy[] = { -1, 0, 1, 0 };

unsigned long long sttoi(std::string str) {
	unsigned long long ret;
	std::stringstream ss; ss << str;
	ss >> ret;
	return ret;
}

ll gcd(ll a, ll b){
	if (b > a)swap(a, b); if (b == 0)return a; else{ return gcd(b, a%b); }
}
ll dp[3100][3100];
void solve() {
	rep(i, 3100){
		dp[0][i] = 0;
	}
	rep(i, 3100){
		dp[i][0] = 1;
	}
	REP(i, 1, 3100) REP(j, 1, 3100){
		dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j];
		if (dp[i][j] > 1e16) dp[i][j] = 1e16;
	}

	int n;
	cin >> n;
	while (n--){
		ll d, x, t;
		cin >> d >> x >> t;
		P(dp[x + d - 1][d - 1] > t ? "ZETUBOU" : "AC");
	}
}

int main() {
	solve();
	return 0;
}
0