結果

問題 No.250 atetubouのzetubou
ユーザー BantakoBantako
提出日時 2017-08-22 15:13:44
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 33 ms / 5,000 ms
コード長 637 bytes
コンパイル時間 1,535 ms
コンパイル使用メモリ 163,348 KB
実行使用メモリ 21,468 KB
最終ジャッジ日時 2024-04-23 04:44:37
合計ジャッジ時間 3,264 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
21,420 KB
testcase_01 AC 11 ms
21,308 KB
testcase_02 AC 30 ms
21,192 KB
testcase_03 AC 33 ms
21,244 KB
testcase_04 AC 30 ms
21,300 KB
testcase_05 AC 30 ms
21,148 KB
testcase_06 AC 25 ms
21,232 KB
testcase_07 AC 16 ms
21,212 KB
testcase_08 AC 28 ms
21,220 KB
testcase_09 AC 24 ms
21,184 KB
testcase_10 AC 29 ms
21,212 KB
testcase_11 AC 22 ms
21,116 KB
testcase_12 AC 27 ms
21,248 KB
testcase_13 AC 19 ms
21,292 KB
testcase_14 AC 9 ms
21,176 KB
testcase_15 AC 31 ms
21,204 KB
testcase_16 AC 30 ms
21,288 KB
testcase_17 AC 30 ms
21,264 KB
testcase_18 AC 31 ms
21,340 KB
testcase_19 AC 31 ms
21,128 KB
testcase_20 AC 9 ms
21,468 KB
testcase_21 AC 8 ms
21,140 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~

ソースコード

diff #

#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
ll INF = 1e17;
int MOD = 1e9+7;
ll dp[1510][1510];
main(){
    fill(dp[0],dp[0]+1501,1);
    for(int i = 0;i <= 1500;i++)dp[i][0] = 1;
    for(int i = 1;i < 1500;i++){
        for(int j = 1;j <= 1500;j++){
            if(dp[i-1][j] > (ll)(1e15) || dp[i][j-1] > (ll)(1e15))
                dp[i][j] = INF;
            else dp[i][j] = dp[i-1][j] + dp[i][j-1];
        }
    }
    int Q;
    cin >> Q;
    for(int i = 0;i < Q;i++){
        ll D,T,X;
        cin >> D >> T >> X;
        if(dp[D-1][T] > X)cout << "ZETUBOU" << endl;
        else cout << "AC" << endl;
    }
}
0