結果

問題 No.250 atetubouのzetubou
コンテスト
ユーザー a01sa01to
提出日時 2025-12-18 00:46:46
言語 C++23
(gcc 13.3.0 + boost 1.89.0)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 620 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,695 ms
コンパイル使用メモリ 280,744 KB
実行使用メモリ 73,856 KB
最終ジャッジ日時 2025-12-18 00:46:54
合計ジャッジ時間 6,422 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;

int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  constexpr ll INF = 1e18;
  vector C(3001, vector<ll>(3001, 0));
  for (int i = 0; i <= 3000; ++i) {
    for (int j = 0; j <= i; ++j) {
      if (j == 0)
        C[i][j] = 1;
      else
        C[i][j] = min(INF, C[i - 1][j - 1] + C[i - 1][j]);
    }
  }

  int q;
  cin >> q;
  while (q--) {
    ll d, x, t;
    cin >> d >> x >> t;
    cout << (C[x + d - 1][x] > t ? "ZETUBOU" : "AC") << '\n';
  }
  return 0;
}
0