結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
tkmst201
|
| 提出日時 | 2017-04-11 22:34:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,038 bytes |
| コンパイル時間 | 1,236 ms |
| コンパイル使用メモリ | 157,792 KB |
| 実行使用メモリ | 20,856 KB |
| 最終ジャッジ日時 | 2024-07-18 09:07:25 |
| 合計ジャッジ時間 | 6,417 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | RE * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:47:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
47 | scanf("%lld %lld %lld", &d, &x, &t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#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