結果

問題 No.250 atetubouのzetubou
ユーザー tsutajtsutaj
提出日時 2017-07-05 09:04:26
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 35 ms / 5,000 ms
コード長 1,009 bytes
コンパイル時間 1,455 ms
コンパイル使用メモリ 163,880 KB
実行使用メモリ 21,248 KB
最終ジャッジ日時 2023-07-28 08:48:54
合計ジャッジ時間 3,380 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
21,068 KB
testcase_01 AC 15 ms
21,248 KB
testcase_02 AC 33 ms
21,132 KB
testcase_03 AC 35 ms
21,096 KB
testcase_04 AC 33 ms
21,048 KB
testcase_05 AC 33 ms
21,048 KB
testcase_06 AC 29 ms
21,188 KB
testcase_07 AC 20 ms
21,184 KB
testcase_08 AC 31 ms
21,120 KB
testcase_09 AC 27 ms
21,052 KB
testcase_10 AC 33 ms
21,064 KB
testcase_11 AC 25 ms
21,064 KB
testcase_12 AC 31 ms
21,040 KB
testcase_13 AC 23 ms
21,060 KB
testcase_14 AC 13 ms
21,112 KB
testcase_15 AC 33 ms
21,052 KB
testcase_16 AC 33 ms
21,052 KB
testcase_17 AC 33 ms
21,048 KB
testcase_18 AC 33 ms
21,120 KB
testcase_19 AC 33 ms
21,100 KB
testcase_20 AC 12 ms
21,108 KB
testcase_21 AC 13 ms
21,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// 基本テンプレート (縮小版)

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for(int (i)=(a); (i)<(n); (i)++)
#define repq(i,a,n) for(int (i)=(a); (i)<=(n); (i)++)
#define repr(i,a,n) for(int (i)=(a); (i)>=(n); (i)--)
#define int long long
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
typedef pair<int, int> pii;
typedef long long ll;
constexpr ll INF = 1001001001001001LL;
constexpr ll MOD = 1000000007LL;

int Q;
int dp[1510][1510];

signed main() {
    dp[0][0] = 1;
    rep(i,0,1500) repq(j,0,1500) {
        dp[i+1][j] = dp[i][j];
        if(j > 0) dp[i+1][j] += dp[i+1][j-1];
        chmin(dp[i+1][j], INF);
    }

    cin >> Q;
    rep(i,0,Q) {
        int D, X, T; cin >> D >> X >> T;
        // printf("value = %lld\n", dp[D][X]);
        if(dp[D][X] <= T) cout << "AC" << endl;
        else cout << "ZETUBOU" << endl;
    }
    return 0;
}
0