結果

問題 No.250 atetubouのzetubou
ユーザー CrossLuna
提出日時 2015-07-24 23:14:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 753 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 65,428 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-08 13:40:47
合計ジャッジ時間 2,931 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>

using namespace std;

long long fac(long long n){
    long long ans = 1;
    while(n > 0){
        ans *= n;
        n--;
    }
    return ans;
}

long long Comb(long long n, long long k){
    long long ans = 1;
    long long kk = k;
    while(kk > 0){
        ans *= n;
        ans /= kk;
        kk--; n--;
    }
    return ans;
}

int main(){
    int N;
    
    cin >> N;
    for(int i=0; i<N; i++){
        long long D, X, T;
        cin >> D >> X >> T;
        if(Comb(X+D-1, X) > T)
            cout << "ZETUBOU" << endl;
        else
            cout << "AC" << endl;
    }
    
    return 0;
}
0