結果

問題 No.250 atetubouのzetubou
ユーザー nanophoto12nanophoto12
提出日時 2016-01-08 01:17:56
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,220 bytes
コンパイル時間 646 ms
コンパイル使用メモリ 84,964 KB
実行使用メモリ 43,256 KB
最終ジャッジ日時 2023-10-19 16:45:45
合計ジャッジ時間 2,077 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 34 ms
43,228 KB
testcase_16 AC 34 ms
43,228 KB
testcase_17 AC 34 ms
43,228 KB
testcase_18 AC 34 ms
43,228 KB
testcase_19 AC 34 ms
43,228 KB
testcase_20 AC 13 ms
43,228 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <limits>

using namespace std;

#define FOR(x,y) for(int x = 0;x < (y);x++)
#define LLI long long int
#define FORR(x,arr) for(auto& x:arr)
#define ALL(a) (a.begin()),(a.end())

#define _L(x) cout<<(x)<<endl

static const int MAX_N = 1600;
LLI dp[MAX_N][MAX_N];
LLI sums[MAX_N][MAX_N];

int main()
{
    FOR(i, MAX_N) FOR(j, MAX_N) sums[i][j] = 0;
    
    FOR(i, 1501)
    {
        dp[i][0] = 1;
        dp[i][1] = i;
    }
    FOR(i, 1501)
    {
        dp[1][i] = 1;
        sums[1][i] = i+1;
    }
    for(int i = 1;i < 1501;i++)
    {
        LLI sum = 0;
        for(int k = 0;k < 1501;k++)
        {
            sum += dp[i][k];
            dp[i+1][k] = sum;
        }
    }
    int n;
    cin >> n;
    FOR(i, n)
    {
        LLI d, x, t;
        cin >> d >> x >> t;
        auto r = dp[d][x];
        //cout << r << endl;
        if(r <= t)
        {
            cout << "AC" << endl;
        }
        else
        {
            cout << "ZETUBOU" << endl;
        }
    }
    return 0;
}
0