結果

問題 No.250 atetubouのzetubou
ユーザー 👑 CleyL
提出日時 2023-06-29 14:56:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 469 bytes
コンパイル時間 649 ms
コンパイル使用メモリ 66,952 KB
最終ジャッジ日時 2025-02-15 03:05:18
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;
const long long MAX = 1000000000000000LL;

bool c(long long a, long long b, long long x){
  long long nw = 1;
  for(int i = 1; b >= i; i++){
    nw = nw*(a-b+i)/i;
    if(x < nw)return false;
  }
  return true;
}

int main(){
  int q;cin>>q;
  for(int i = 0; q > i; i++){
    int a,b;cin>>a>>b;
    long long x;cin>>x;
    if(c(a+b-1, b, x)){
      cout << "AC" << endl;
    }else{
      cout << "ZETUBOU" << endl;
    }
  }
}
0