結果

問題 No.250 atetubouのzetubou
ユーザー mamekinmamekin
提出日時 2016-01-30 16:30:30
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 1,075 bytes
コンパイル時間 832 ms
コンパイル使用メモリ 96,756 KB
実行使用メモリ 73,468 KB
最終ジャッジ日時 2023-10-21 17:58:26
合計ジャッジ時間 3,939 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
73,468 KB
testcase_01 AC 60 ms
73,468 KB
testcase_02 AC 80 ms
73,468 KB
testcase_03 AC 83 ms
73,468 KB
testcase_04 AC 81 ms
73,468 KB
testcase_05 AC 82 ms
73,468 KB
testcase_06 AC 76 ms
73,468 KB
testcase_07 AC 66 ms
73,468 KB
testcase_08 AC 79 ms
73,468 KB
testcase_09 AC 73 ms
73,468 KB
testcase_10 AC 83 ms
73,468 KB
testcase_11 AC 72 ms
73,468 KB
testcase_12 AC 79 ms
73,468 KB
testcase_13 AC 70 ms
73,468 KB
testcase_14 AC 60 ms
73,468 KB
testcase_15 AC 81 ms
73,468 KB
testcase_16 AC 82 ms
73,468 KB
testcase_17 AC 83 ms
73,468 KB
testcase_18 AC 83 ms
73,468 KB
testcase_19 AC 82 ms
73,468 KB
testcase_20 AC 59 ms
73,468 KB
testcase_21 AC 59 ms
73,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;

const long long INF = LLONG_MAX / 4;

void combination(int n, vector<vector<long long> >& comb)
{
    comb.assign(n+1, vector<long long>(n+1, 0));
    for(int i=0; i<=n; ++i){
        comb[i][0] = 1;
        for(int j=1; j<=i; ++j){
            comb[i][j] = comb[i-1][j-1] + comb[i-1][j];
            comb[i][j] = min(INF, comb[i][j]);
        }
    }
}

int main()
{
    vector<vector<long long> > comb;
    combination(3000, comb);

    int q;
    cin >> q;

    while(--q >= 0){
        int d, x;
        long long t;
        cin >> d >> x >> t;

        if(comb[x+d-1][x] <= t)
            cout << "AC" << endl;
        else
            cout << "ZETUBOU" << endl;
    }

    return 0;
}
0