結果

問題 No.250 atetubouのzetubou
ユーザー 0w10w1
提出日時 2016-11-26 14:42:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 516 bytes
コンパイル時間 1,625 ms
コンパイル使用メモリ 167,432 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-05 13:38:39
合計ジャッジ時間 3,532 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
5,248 KB
testcase_01 AC 13 ms
5,376 KB
testcase_02 AC 114 ms
5,376 KB
testcase_03 AC 129 ms
5,376 KB
testcase_04 AC 111 ms
5,376 KB
testcase_05 AC 112 ms
5,376 KB
testcase_06 AC 88 ms
5,376 KB
testcase_07 AC 44 ms
5,376 KB
testcase_08 AC 108 ms
5,376 KB
testcase_09 AC 81 ms
5,376 KB
testcase_10 AC 112 ms
5,376 KB
testcase_11 AC 69 ms
5,376 KB
testcase_12 AC 105 ms
5,376 KB
testcase_13 AC 57 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

const string msg[] = { "ZETUBOU", "AC" };

signed main(){
  int Q; cin >> Q;
  for( int kase = 0; kase < Q; ++kase ){
    int D, X; long long T; cin >> D >> X >> T;
    long double f = 0;
    int a = D + X - 1;
    int b = max( X, D - 1 );
    int c = min( X, D - 1 );
    for( int i = b + 1; i <= a; ++i )
      f += log2( i );
    for( int i = 2; i <= c; ++i )
      f -= log2( i );
    cout << msg[ f - 1e-15 <= log2( ( long double ) T ) ] << endl;
  }
  return 0;
}
0