結果

問題 No.250 atetubouのzetubou
ユーザー pekempeypekempey
提出日時 2015-07-24 23:07:14
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 66 ms / 5,000 ms
コード長 1,243 bytes
コンパイル時間 1,103 ms
コンパイル使用メモリ 144,180 KB
実行使用メモリ 128,656 KB
最終ジャッジ日時 2023-09-22 22:52:29
合計ジャッジ時間 3,630 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
128,320 KB
testcase_01 AC 46 ms
128,600 KB
testcase_02 AC 63 ms
128,396 KB
testcase_03 AC 65 ms
128,440 KB
testcase_04 AC 63 ms
128,472 KB
testcase_05 AC 63 ms
128,384 KB
testcase_06 AC 58 ms
128,380 KB
testcase_07 AC 50 ms
128,600 KB
testcase_08 AC 62 ms
128,332 KB
testcase_09 AC 57 ms
128,348 KB
testcase_10 AC 63 ms
128,532 KB
testcase_11 AC 55 ms
128,404 KB
testcase_12 AC 61 ms
128,380 KB
testcase_13 AC 53 ms
128,484 KB
testcase_14 AC 43 ms
128,328 KB
testcase_15 AC 64 ms
128,652 KB
testcase_16 AC 64 ms
128,372 KB
testcase_17 AC 64 ms
128,348 KB
testcase_18 AC 66 ms
128,400 KB
testcase_19 AC 64 ms
128,396 KB
testcase_20 AC 44 ms
128,320 KB
testcase_21 AC 43 ms
128,656 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[4000][4000];
const ll INF = 10000000000000000ll;

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

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

    rep2 (i, 1, 4000) {
        rep2 (j, 1, 4000) {
            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