結果

問題 No.250 atetubouのzetubou
ユーザー ferinferin
提出日時 2017-02-13 18:20:21
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 950 bytes
コンパイル時間 2,167 ms
コンパイル使用メモリ 144,076 KB
実行使用メモリ 28,196 KB
最終ジャッジ日時 2023-08-28 15:36:55
合計ジャッジ時間 2,429 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 12 ms
27,972 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 12 ms
27,924 KB
testcase_21 AC 11 ms
27,980 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) {
    int 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 cout << "AC" << endl;
  }

  return 0;
}
0