結果

問題 No.250 atetubouのzetubou
ユーザー syoken_desukasyoken_desuka
提出日時 2015-07-25 00:22:50
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 1,359 bytes
コンパイル時間 659 ms
コンパイル使用メモリ 92,996 KB
実行使用メモリ 21,596 KB
最終ジャッジ日時 2023-09-23 02:57:25
合計ジャッジ時間 2,208 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
21,128 KB
testcase_01 AC 11 ms
21,108 KB
testcase_02 AC 30 ms
21,280 KB
testcase_03 AC 32 ms
21,280 KB
testcase_04 AC 29 ms
21,412 KB
testcase_05 AC 30 ms
21,292 KB
testcase_06 AC 25 ms
21,072 KB
testcase_07 AC 17 ms
21,148 KB
testcase_08 AC 29 ms
21,148 KB
testcase_09 AC 24 ms
21,096 KB
testcase_10 AC 30 ms
21,228 KB
testcase_11 AC 22 ms
21,176 KB
testcase_12 AC 28 ms
21,380 KB
testcase_13 AC 20 ms
21,268 KB
testcase_14 AC 9 ms
21,148 KB
testcase_15 AC 31 ms
21,228 KB
testcase_16 AC 31 ms
21,232 KB
testcase_17 AC 31 ms
21,336 KB
testcase_18 AC 31 ms
21,596 KB
testcase_19 AC 30 ms
21,364 KB
testcase_20 AC 9 ms
20,952 KB
testcase_21 AC 9 ms
21,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #



#include <algorithm>
#include <array>
#include <sstream>
#include <cstdio>
#include <functional>
#include <cstdlib>
#include <cctype>
#include <ostream>
#include<complex>
#include <cmath>
#include <iostream>
#include <stack>
#include <queue>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <bitset>
#include <iomanip>
#include <string>
#include <vector>
#include <string>

using namespace std;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)

typedef long long ll;



int main()
{
    int n;
    int d = 0,x = 0;
    ll t = 0;
    static ll dp[1503][1503];
    vector<string> ans;
    cin >> n;
    rep(i,1501)
    {
        dp[0][i] = 1;
        dp[i][0] = 1;
    }
    rep(i,1501)
    {
        rep(j,1501)
        {
            if (dp[i][j+1] > 1e15 || dp[i+1][j] > 1e15)
            {
                 dp[i+1][j+1] = 1e16;
            }
            else
            {
                dp[i+1][j+1] = dp[i][j+1] + dp[i+1][j];
            }
        }
    }

    for (int i = 0; i < n; i++)
    {
        cin >> d >> x >> t;
        if (dp[x][d-1] <= t)
        {
            ans.push_back("AC");
        }
        else
        {
            ans.push_back("ZETUBOU");
        }
    }
    for (int i = 0; i < n; i++)
    {
        cout << ans[i] << endl;
    }

    return 0;
}



0