結果

問題 No.250 atetubouのzetubou
ユーザー kobajinkobajin
提出日時 2018-04-03 23:28:35
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 579 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 52,584 KB
実行使用メモリ 21,260 KB
最終ジャッジ日時 2023-09-08 15:34:44
合計ジャッジ時間 2,004 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
20,992 KB
testcase_01 AC 13 ms
20,940 KB
testcase_02 AC 32 ms
21,112 KB
testcase_03 AC 34 ms
20,936 KB
testcase_04 WA -
testcase_05 AC 32 ms
21,052 KB
testcase_06 AC 28 ms
20,984 KB
testcase_07 AC 19 ms
20,960 KB
testcase_08 AC 31 ms
20,940 KB
testcase_09 AC 26 ms
21,056 KB
testcase_10 WA -
testcase_11 AC 24 ms
20,936 KB
testcase_12 AC 31 ms
20,944 KB
testcase_13 AC 22 ms
21,004 KB
testcase_14 AC 11 ms
21,052 KB
testcase_15 AC 32 ms
20,924 KB
testcase_16 AC 33 ms
21,052 KB
testcase_17 AC 32 ms
20,944 KB
testcase_18 AC 32 ms
20,984 KB
testcase_19 AC 32 ms
20,940 KB
testcase_20 AC 12 ms
21,020 KB
testcase_21 AC 12 ms
20,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

typedef long long ll;

const int deplim = 1500;
const int xlim = 1500;

ll dp[deplim+1][xlim+1];

void init();
int main(){
  init();

  int q; cin >> q;
  for(int i=0; i<q; i++){
    ll d, x, t;
    cin >> d >> x >> t;

    if(dp[d][x] > t || dp[d][x] < 0){
      cout << "ZETUBOU" << endl;
    }
    else{
      cout << "AC" << endl;
    }
  }

  return 0;
}

void init(){
  for(int i=0; i<=xlim; i++) dp[i][0] = 1;

  for(int d=0; d<deplim; d++){
    for(int x=1; x<=xlim; x++){
      dp[d+1][x] = dp[d+1][x-1] + dp[d][x];
    }
  }
}
0