結果

問題 No.250 atetubouのzetubou
ユーザー latte0119latte0119
提出日時 2015-10-26 01:33:50
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 677 bytes
コンパイル時間 1,281 ms
コンパイル使用メモリ 144,868 KB
実行使用メモリ 72,332 KB
最終ジャッジ日時 2023-10-11 10:04:11
合計ジャッジ時間 3,375 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
72,064 KB
testcase_01 AC 22 ms
72,044 KB
testcase_02 AC 39 ms
72,048 KB
testcase_03 AC 42 ms
72,068 KB
testcase_04 AC 40 ms
72,004 KB
testcase_05 AC 41 ms
71,988 KB
testcase_06 AC 36 ms
72,332 KB
testcase_07 AC 28 ms
71,996 KB
testcase_08 AC 39 ms
72,272 KB
testcase_09 AC 34 ms
72,128 KB
testcase_10 AC 40 ms
72,056 KB
testcase_11 AC 32 ms
72,000 KB
testcase_12 AC 38 ms
72,320 KB
testcase_13 AC 30 ms
72,200 KB
testcase_14 AC 20 ms
72,120 KB
testcase_15 AC 40 ms
72,064 KB
testcase_16 AC 40 ms
72,000 KB
testcase_17 AC 41 ms
72,056 KB
testcase_18 AC 41 ms
72,052 KB
testcase_19 AC 41 ms
72,052 KB
testcase_20 AC 20 ms
72,052 KB
testcase_21 AC 20 ms
72,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
typedef vector<int>vi;

const int INF=1001001001001001001ll;
int comb[3000][3000];
signed main(){
    comb[0][0]=1;
    for(int i=1;i<3000;i++){
        comb[i][0]=comb[i][i]=1;
        for(int j=1;j<i;j++){
            comb[i][j]=min(INF,comb[i-1][j]+comb[i-1][j-1]);
        }
    }


    int Q;cin>>Q;
    while(Q--){
        int d,x,t;
        cin>>d>>x>>t;
        if(comb[x+d-1][d-1]>t)cout<<"ZETUBOU"<<endl;
        else cout<<"AC"<<endl;
    }
    return 0;
}
0