結果
| 問題 | No.250 atetubouのzetubou | 
| コンテスト | |
| ユーザー |  reload_zzz | 
| 提出日時 | 2019-02-27 23:13:00 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                TLE
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 417 bytes | 
| コンパイル時間 | 168 ms | 
| コンパイル使用メモリ | 23,040 KB | 
| 実行使用メモリ | 8,224 KB | 
| 最終ジャッジ日時 | 2024-06-23 05:22:58 | 
| 合計ジャッジ時間 | 13,145 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | -- * 2 | 
| other | TLE * 1 -- * 19 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |   scanf("%lld", &q);
      |   ~~~~~^~~~~~~~~~~~
main.cpp:17:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   17 |     scanf("%lld%lld%lld", &d, &x, &t);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include<cstdio>
using namespace std;
typedef long long ll;
ll q, d, x, t;
ll nCk(ll n, ll k, ll mx) {
  if (k == 0) return 1;
  ll temp = nCk(n-1, k-1, mx);
  if (temp > mx) return temp;
  return nCk(n-1, k-1, mx) * n / k;
}
int main() {
  scanf("%lld", &q);
  for (ll i = 0; i < q; i++) {
    scanf("%lld%lld%lld", &d, &x, &t);
    if (nCk(x+d-1, d-1, t) > t) printf("ZETUBOU\n");
    else printf("AC\n");
  }
}
            
            
            
        