結果

問題 No.1220 yukipoker
ユーザー ShibuyapShibuyap
提出日時 2020-09-04 21:49:34
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 219 ms / 2,000 ms
コード長 636 bytes
コンパイル時間 1,924 ms
コンパイル使用メモリ 197,612 KB
実行使用メモリ 5,372 KB
最終ジャッジ日時 2023-08-17 15:29:13
合計ジャッジ時間 4,965 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,048 KB
testcase_01 AC 6 ms
5,044 KB
testcase_02 AC 6 ms
5,120 KB
testcase_03 AC 7 ms
5,044 KB
testcase_04 AC 6 ms
5,032 KB
testcase_05 AC 6 ms
5,032 KB
testcase_06 AC 6 ms
5,040 KB
testcase_07 AC 6 ms
5,120 KB
testcase_08 AC 7 ms
5,124 KB
testcase_09 AC 6 ms
5,052 KB
testcase_10 AC 6 ms
5,016 KB
testcase_11 AC 102 ms
5,064 KB
testcase_12 AC 107 ms
5,048 KB
testcase_13 AC 205 ms
5,028 KB
testcase_14 AC 204 ms
5,068 KB
testcase_15 AC 134 ms
5,192 KB
testcase_16 AC 155 ms
5,372 KB
testcase_17 AC 91 ms
5,240 KB
testcase_18 AC 117 ms
5,016 KB
testcase_19 AC 219 ms
5,052 KB
testcase_20 AC 214 ms
5,052 KB
testcase_21 AC 7 ms
5,044 KB
testcase_22 AC 6 ms
5,084 KB
testcase_23 AC 6 ms
5,048 KB
testcase_24 AC 6 ms
5,036 KB
testcase_25 AC 6 ms
5,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Straight");}else{puts("Flush");}
#define MAX_N 200005

double sum[MAX_N];

int main() {
    srep(i,1,MAX_N){
        sum[i] = sum[i-1] + log(i);
    }

    int Q;
    cin >> Q;
    rep(_,Q){
        ll n, m, k;
        cin >> n >> m >> k;
        double st = log(m) * (k-1);
        double fl = sum[n] - (sum[k] + sum[n-k+1]);
        if(st < fl)yn;
    }

    return 0;
}
 
 
0