結果

問題 No.250 atetubouのzetubou
ユーザー h_nosonh_noson
提出日時 2016-02-20 18:08:44
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 796 bytes
コンパイル時間 588 ms
コンパイル使用メモリ 69,712 KB
実行使用メモリ 21,292 KB
最終ジャッジ日時 2023-10-23 18:40:26
合計ジャッジ時間 2,333 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
21,292 KB
testcase_01 AC 21 ms
21,292 KB
testcase_02 AC 41 ms
21,292 KB
testcase_03 AC 43 ms
21,292 KB
testcase_04 AC 40 ms
21,292 KB
testcase_05 AC 41 ms
21,292 KB
testcase_06 AC 35 ms
21,292 KB
testcase_07 AC 27 ms
21,292 KB
testcase_08 AC 39 ms
21,292 KB
testcase_09 AC 34 ms
21,292 KB
testcase_10 AC 40 ms
21,292 KB
testcase_11 AC 32 ms
21,292 KB
testcase_12 AC 38 ms
21,292 KB
testcase_13 AC 29 ms
21,292 KB
testcase_14 AC 18 ms
21,292 KB
testcase_15 AC 41 ms
21,292 KB
testcase_16 AC 40 ms
21,292 KB
testcase_17 AC 41 ms
21,292 KB
testcase_18 AC 41 ms
21,292 KB
testcase_19 AC 41 ms
21,292 KB
testcase_20 AC 18 ms
21,292 KB
testcase_21 AC 18 ms
21,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;

#define RREP(i,s,e) for (i = e-1; i >= s; i--)
#define rrep(i,n) RREP(i,0,n)
#define REP(i,s,e) for (i = s; i < e; i++)
#define rep(i,n) REP(i,0,n)
#define INF 1e8

int main() {
    int i, j, q;
    vector<vector<long long>> dp(1501);
    rep (i,1501) dp[i].resize(1501);
    dp[0][0] = 1;
    REP (i,1,1501) {
        long long sum = 0;
        rep (j,1501) {
            dp[i][j] = min((long long)1e15+1,dp[i-1][j] + sum);
            sum = dp[i][j];
        }
    }
    cin >> q;
    rep (i,q) {
        int d,x;
        long long t;
        cin >> d >> x >> t;
        if (dp[d][x] <= t)
            cout << "AC" << endl;
        else
            cout << "ZETUBOU" << endl;
    }
    return 0;
}
0