結果

問題 No.250 atetubouのzetubou
ユーザー ふっぴーふっぴー
提出日時 2017-08-31 23:24:33
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 41 ms / 5,000 ms
コード長 1,217 bytes
コンパイル時間 1,561 ms
コンパイル使用メモリ 169,180 KB
実行使用メモリ 21,184 KB
最終ジャッジ日時 2023-08-06 13:43:24
合計ジャッジ時間 3,253 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
20,740 KB
testcase_01 AC 20 ms
20,688 KB
testcase_02 AC 38 ms
21,144 KB
testcase_03 AC 41 ms
20,952 KB
testcase_04 AC 37 ms
21,148 KB
testcase_05 AC 38 ms
21,184 KB
testcase_06 AC 33 ms
20,728 KB
testcase_07 AC 25 ms
20,632 KB
testcase_08 AC 36 ms
21,004 KB
testcase_09 AC 32 ms
20,820 KB
testcase_10 AC 38 ms
21,004 KB
testcase_11 AC 30 ms
20,888 KB
testcase_12 AC 35 ms
21,148 KB
testcase_13 AC 27 ms
20,784 KB
testcase_14 AC 18 ms
20,680 KB
testcase_15 AC 39 ms
20,996 KB
testcase_16 AC 38 ms
21,064 KB
testcase_17 AC 38 ms
20,936 KB
testcase_18 AC 38 ms
21,144 KB
testcase_19 AC 39 ms
20,988 KB
testcase_20 AC 18 ms
20,776 KB
testcase_21 AC 18 ms
20,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;

#define DEBUG(x) cout << #x << ": " << x << endl;
#define DEBUG_VEC(v)                                      \
  cout << #v << ":";                                      \
  for (int i = 0; i < v.size(); i++) cout << " " << v[i]; \
  cout << endl

typedef long long ll;
#define vi vector<int>
#define vl vector<ll>
#define vii vector<vector<int> >
#define vll vector<vector<ll> >
#define vs vector<string>
#define pii pair<int, int>
#define pis pair<int, string>
#define psi pair<string, int>
const int inf = 1000000001;
const ll INF = 1e16;
#define MOD 1000000007
#define mod 1000000009
#define pi 3.14159265358979323846
#define Sp(p) cout << setprecision(15) << fixed << p << endl;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

int main() {
  int q, i, j;
  cin >> q;
  vl d(q), x(q), t(q);
  for (i = 0; i < q; i++) {
    cin >> d[i] >> x[i] >> t[i];
  }
  vll dp(1501,vl(1501,1));
  for(i = 2; i <= 1500; i++){
    for(j = 1; j <= 1500; j++){
      dp[i][j] = min(dp[i][j-1] + dp[i-1][j],(ll)1000000000000001);
    }
  }
  for(i = 0; i < q; i++){
    if(dp[d[i]][x[i]] <= t[i])
      cout<<"AC"<<endl;
    else
      cout<<"ZETUBOU"<<endl;
  }
  return 0;
}
    
0