結果

問題 No.250 atetubouのzetubou
ユーザー 👑 obakyanobakyan
提出日時 2019-05-05 11:37:47
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 808 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 70,952 KB
実行使用メモリ 21,124 KB
最終ジャッジ日時 2023-09-06 18:13:43
合計ジャッジ時間 2,338 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
20,888 KB
testcase_01 AC 10 ms
20,920 KB
testcase_02 AC 27 ms
20,892 KB
testcase_03 AC 31 ms
21,124 KB
testcase_04 AC 27 ms
20,876 KB
testcase_05 AC 29 ms
20,884 KB
testcase_06 AC 24 ms
20,948 KB
testcase_07 AC 16 ms
20,936 KB
testcase_08 AC 27 ms
20,876 KB
testcase_09 AC 22 ms
20,884 KB
testcase_10 AC 28 ms
20,996 KB
testcase_11 AC 19 ms
20,872 KB
testcase_12 AC 25 ms
21,040 KB
testcase_13 AC 17 ms
21,008 KB
testcase_14 AC 7 ms
20,952 KB
testcase_15 AC 26 ms
21,080 KB
testcase_16 AC 28 ms
21,076 KB
testcase_17 AC 28 ms
20,932 KB
testcase_18 AC 28 ms
20,912 KB
testcase_19 AC 28 ms
20,916 KB
testcase_20 AC 8 ms
20,948 KB
testcase_21 AC 8 ms
20,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstdlib>
#include <cstddef>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <iostream>
#include <iomanip>
#include <numeric>
#define L64 long long
#define MOD (1000000007LL)

#define INF (1000000000000001LL)
static L64 dp[1500][1501];

int main(void)
{
  for(int i_x = 0; i_x < 1501; i_x++){
    dp[0][i_x] = 1;
  }
  for(int i_d = 1; i_d < 1500; i_d++){
    L64 psum = 0;
    for(int i_x = 0; i_x < 1501; i_x++){
      psum = std::min(INF, psum + dp[i_d - 1][i_x]);
      dp[i_d][i_x] = psum;
    }
  }
  int q; std::cin >> q;
  for(int i = 0; i < q; i++){
    int d, x;
    L64 t;
    std::cin >> d >> x >> t;
    if(dp[d - 1][x] <= t){
      std::cout << "AC" << std::endl;
    } else {
      std::cout << "ZETUBOU" << std::endl;
    }
  }
}
0