結果

問題 No.250 atetubouのzetubou
ユーザー ferinferin
提出日時 2017-02-13 18:26:01
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 993 bytes
コンパイル時間 1,085 ms
コンパイル使用メモリ 144,228 KB
実行使用メモリ 28,160 KB
最終ジャッジ日時 2023-08-28 15:37:05
合計ジャッジ時間 3,682 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
27,912 KB
testcase_01 AC 16 ms
27,940 KB
testcase_02 AC 34 ms
27,892 KB
testcase_03 AC 35 ms
27,924 KB
testcase_04 AC 33 ms
27,924 KB
testcase_05 AC 33 ms
28,080 KB
testcase_06 AC 29 ms
27,920 KB
testcase_07 AC 21 ms
28,012 KB
testcase_08 AC 32 ms
27,888 KB
testcase_09 AC 27 ms
28,080 KB
testcase_10 AC 33 ms
27,948 KB
testcase_11 AC 26 ms
27,940 KB
testcase_12 AC 31 ms
28,036 KB
testcase_13 AC 24 ms
27,944 KB
testcase_14 AC 13 ms
28,160 KB
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 14 ms
27,940 KB
testcase_21 AC 13 ms
27,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (int i = (int)a; i < (int)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MOD 1000000007
#define INF 1000000000
#define PI 3.14159265359
#define EPS 1e-12

ll dp[2000][2000];

int main(void)
{
  REP(i, 1505) dp[0][i] = i+1;
  REP(i, 1505) dp[i][0] = 1;
  FOR(i, 1, 1505) {
    FOR(j, 1, 1505) {
      if(dp[i][j-1] + dp[i-1][j] > 1000000000000000) dp[i][j] = 1000000000000001;
      else dp[i][j] = dp[i][j-1] + dp[i-1][j];
    }
  }

  int q;
  cin >> q;
  REP(i, q) {
    ll d, x, t;
    cin >> d >> x >> t;

    //cout << dp[d-2][x-1] << " ";
    if(d == 1 && t >= 1) cout << "AC" << endl;
    else if(dp[d-2][x] > t) cout << "ZETUBOU" << endl;
    else if(dp[d-2][x] <= t) cout << "AC" << endl;
    else assert(false);
  }

  return 0;
}
0