結果

問題 No.250 atetubouのzetubou
ユーザー daku9640daku9640
提出日時 2017-02-24 21:43:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 68 ms / 5,000 ms
コード長 907 bytes
コンパイル時間 1,469 ms
コンパイル使用メモリ 165,600 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-30 23:13:43
合計ジャッジ時間 3,006 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
4,360 KB
testcase_01 AC 3 ms
4,376 KB
testcase_02 AC 17 ms
4,376 KB
testcase_03 AC 19 ms
4,376 KB
testcase_04 AC 17 ms
4,380 KB
testcase_05 AC 17 ms
4,376 KB
testcase_06 AC 13 ms
4,380 KB
testcase_07 AC 8 ms
4,376 KB
testcase_08 AC 16 ms
4,376 KB
testcase_09 AC 13 ms
4,376 KB
testcase_10 AC 17 ms
4,380 KB
testcase_11 AC 11 ms
4,380 KB
testcase_12 AC 16 ms
4,380 KB
testcase_13 AC 9 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 66 ms
4,380 KB
testcase_16 AC 67 ms
4,376 KB
testcase_17 AC 66 ms
4,376 KB
testcase_18 AC 68 ms
4,380 KB
testcase_19 AC 67 ms
4,376 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define rep(i,a,n) for(int i=(a), i##_len=(n); i<i##_len; ++i)
#define rrep(i,a,n) for(int i=(a); i>n; --i)
#define len(x) ((int)(x).size())
#define mp make_pair
#define eb emplace_back
typedef long long ll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long long> vll;
typedef vector<string> vs;
typedef vector<bool> vb;
constexpr ll MAX_T = 1e15 + 10;
ll c(ll n, ll r) {
	ll res = 1;
	rrep(i, r - 1, -1) {
		res = res * (n - i) / (r - i);
		if (res >= MAX_T) return MAX_T;
	}
	return res;
}
int main() {
	int q; cin >> q;
	rep(i, 0, q) {
		ll d, x, t; cin >> d >> x >> t;
		P(c(x + d - 1, d - 1) <= t ? "AC" : "ZETUBOU");
	}
	return 0;
}
0