結果

問題 No.250 atetubouのzetubou
ユーザー dnishdnish
提出日時 2018-06-08 10:46:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,081 bytes
コンパイル時間 1,459 ms
コンパイル使用メモリ 80,988 KB
実行使用メモリ 21,316 KB
最終ジャッジ日時 2023-09-12 23:14:40
合計ジャッジ時間 2,597 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 22 ms
21,108 KB
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 AC 21 ms
21,032 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 20 ms
21,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define p(s) cout<<(s)<<endl
#define REP(i,n,N) for(int i=n;i<N;i++)
#define RREP(i,n,N) for(int i=N-1;i>=n;i--)
#define CK(n,a,b) ((a)<=(n)&&(n)<(b))
#define F first
#define S second
typedef long long ll;
using namespace std;
const int inf=1e9+7;

ll Q, D, X, T;
ll comb[1510][1510];
void combinationDP(int n) {
    REP(i, 0, 1501){
        comb[0][i] = 1;
        comb[i][0] = 1;
    }
    for (int i = 1; i < n + 1; i++) {
        for (int j = 0; j < n + 1; j++) {
            if (i == j) comb[i][j] = 1;
            else comb[i][j] = comb[i - 1][j] + comb[i][j-1];
            if(comb[i][j]>1e15) comb[i][j]=1e15+1;
        }
    }
}

int main(){
    combinationDP(1500);
    cin>>Q;
    REP(i,0,Q){
        cin>>D>>X>>T;
        if(comb[D-1][X]>T){
            p("ZETUBOU");
        }else{
            p("AC");
        }
    }

    return 0;
}
0