結果
| 問題 | No.250 atetubouのzetubou |
| コンテスト | |
| ユーザー |
tkmst201
|
| 提出日時 | 2017-04-11 22:34:43 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,038 bytes |
| 記録 | |
| コンパイル時間 | 858 ms |
| コンパイル使用メモリ | 178,592 KB |
| 実行使用メモリ | 198,364 KB |
| 最終ジャッジ日時 | 2026-04-02 00:44:33 |
| 合計ジャッジ時間 | 4,051 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | RE * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pii> P;
const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS = 1e-10;
ll ncr[1501][1501];
void nCr(ll n, ll r) {
REP(i, n + 1) {
REP(j, i + 1) {
if (j == 0 || j == i) ncr[i][j] = 1;
else {
ncr[i][j] = ncr[i - 1][j - 1] + ncr[i - 1][j];
chmin(ncr[i][j], 1ll<<61);
}
}
}
}
ll nhr(ll n, ll r) {
return ncr[n + r - 1][r];
}
int main() {
nCr(1500, 1500);
int q;
cin >> q;
REP(i, q) {
ll d, x, t;
scanf("%lld %lld %lld", &d, &x, &t);
puts(nhr(d, x) <= t ? "AC" : "ZETUBOU");
}
return 0;
}
tkmst201