結果

問題 No.250 atetubouのzetubou
ユーザー ferinferin
提出日時 2017-02-13 18:57:52
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 35 ms / 5,000 ms
コード長 939 bytes
コンパイル時間 1,062 ms
コンパイル使用メモリ 144,248 KB
実行使用メモリ 28,240 KB
最終ジャッジ日時 2023-08-28 15:39:24
合計ジャッジ時間 2,820 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
27,952 KB
testcase_01 AC 15 ms
27,924 KB
testcase_02 AC 33 ms
28,192 KB
testcase_03 AC 35 ms
28,100 KB
testcase_04 AC 33 ms
27,928 KB
testcase_05 AC 33 ms
27,876 KB
testcase_06 AC 29 ms
28,192 KB
testcase_07 AC 20 ms
28,192 KB
testcase_08 AC 32 ms
27,872 KB
testcase_09 AC 27 ms
27,876 KB
testcase_10 AC 32 ms
27,936 KB
testcase_11 AC 25 ms
27,876 KB
testcase_12 AC 30 ms
27,932 KB
testcase_13 AC 23 ms
27,884 KB
testcase_14 AC 12 ms
27,920 KB
testcase_15 AC 32 ms
27,920 KB
testcase_16 AC 33 ms
28,180 KB
testcase_17 AC 34 ms
28,104 KB
testcase_18 AC 33 ms
27,928 KB
testcase_19 AC 33 ms
28,040 KB
testcase_20 AC 12 ms
28,140 KB
testcase_21 AC 13 ms
28,240 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] = 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(dp[d-1][x] > t) cout << "ZETUBOU" << endl;
    else if(dp[d-1][x] <= t) cout << "AC" << endl;
    else assert(false);
  }

  return 0;
}
0