結果

問題 No.250 atetubouのzetubou
ユーザー pekempeypekempey
提出日時 2015-07-24 23:03:18
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 1,242 bytes
コンパイル時間 1,183 ms
コンパイル使用メモリ 144,428 KB
実行使用メモリ 33,360 KB
最終ジャッジ日時 2023-09-22 22:48:12
合計ジャッジ時間 5,625 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 AC 32 ms
33,360 KB
testcase_16 AC 31 ms
33,204 KB
testcase_17 AC 32 ms
33,076 KB
testcase_18 AC 32 ms
33,288 KB
testcase_19 AC 32 ms
33,356 KB
testcase_20 AC 11 ms
33,140 KB
testcase_21 AC 10 ms
33,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, a) for (int i = 0; i < (a); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
#define repr(i, a) for (int i = (a) - 1; i >= 0; i--)
#define repr2(i, a, b) for (int i = (b) - 1; i >= (a); i--)
#define itall(a) a.begin(), a.end()
using namespace std;
typedef long long ll;
const ll inf = 1e9;
const ll mod = 1e9 + 7;
const double pi = acos(-1);
const double eps = 1e-8;
template<typename T> inline T sq(T a) { return a * a; }
template<typename T> inline T cb(T a) { return a * a * a; }
template<typename T> inline bool umin(T &a, const T &b) { return b < a && (a = b, true); }
template<typename T> inline bool umax(T &a, const T &b) { return a < b && (a = b, true); }

ll comb[2000][2000];
const ll INF = 10000000000000000;

int main() {
    int Q;
    cin >> Q;

    rep (i, 2000) comb[i][0] = 1;

    rep2 (i, 1, 2000) {
        rep2 (j, 1, i + 1) {
            comb[i][j] = comb[i - 1][j] + comb[i - 1][j - 1];
            comb[i][j] = min(comb[i][j], INF);
        }
    }

    rep (i, Q) {
        ll D, X, T;
        cin >> D >> X >> T;

        if (comb[D + X - 1][D - 1] <= T) {
            cout << "AC" << endl;
        } else {
            cout << "ZETUBOU" << endl;
        }
    }
}
0