結果
| 問題 | No.250 atetubouのzetubou | 
| コンテスト | |
| ユーザー |  ferin | 
| 提出日時 | 2017-02-13 18:57:52 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 51 ms / 5,000 ms | 
| コード長 | 939 bytes | 
| コンパイル時間 | 1,644 ms | 
| コンパイル使用メモリ | 158,320 KB | 
| 実行使用メモリ | 27,008 KB | 
| 最終ジャッジ日時 | 2024-12-29 19:02:57 | 
| 合計ジャッジ時間 | 3,650 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 20 | 
ソースコード
#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;
}
            
            
            
        