結果

問題 No.1220 yukipoker
ユーザー hedwig100hedwig100
提出日時 2020-09-05 16:54:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 923 bytes
コンパイル時間 1,474 ms
コンパイル使用メモリ 165,496 KB
実行使用メモリ 4,804 KB
最終ジャッジ日時 2023-08-19 08:38:31
合計ジャッジ時間 3,495 ms
ジャッジサーバーID
(参考情報)
judge15 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
4,656 KB
testcase_01 AC 6 ms
4,656 KB
testcase_02 AC 6 ms
4,668 KB
testcase_03 AC 6 ms
4,580 KB
testcase_04 AC 7 ms
4,612 KB
testcase_05 AC 7 ms
4,576 KB
testcase_06 AC 6 ms
4,596 KB
testcase_07 AC 6 ms
4,664 KB
testcase_08 AC 7 ms
4,608 KB
testcase_09 AC 6 ms
4,576 KB
testcase_10 AC 6 ms
4,560 KB
testcase_11 AC 22 ms
4,608 KB
testcase_12 AC 23 ms
4,668 KB
testcase_13 AC 40 ms
4,576 KB
testcase_14 AC 38 ms
4,656 KB
testcase_15 AC 27 ms
4,624 KB
testcase_16 AC 30 ms
4,696 KB
testcase_17 AC 20 ms
4,632 KB
testcase_18 AC 24 ms
4,560 KB
testcase_19 AC 40 ms
4,568 KB
testcase_20 AC 41 ms
4,560 KB
testcase_21 AC 6 ms
4,652 KB
testcase_22 AC 6 ms
4,564 KB
testcase_23 AC 6 ms
4,592 KB
testcase_24 AC 6 ms
4,804 KB
testcase_25 AC 7 ms
4,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)(n); i ++)
#define irep(i,n) for (int i = (int)(n) - 1;i >= 0;--i)
using namespace std;
using ll = long long;
using PL = pair<ll,ll>;
using P = pair<int,int>;
constexpr int INF = 1000000000;
constexpr long long HINF = 1000000000000000;
constexpr long long MOD = 1000000007;// = 998244353;
constexpr double EPS = 1e-4;
constexpr double PI = 3.14159265358979;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int Q; cin >> Q;
    const int MAXN = 100010;
    vector<long double> fact(MAXN,0);
    rep(i,MAXN - 1) fact[i + 1] = fact[i] + log((long double)i + 1);

    rep(i,Q) {
        int N,M,K; cin >> N >> M >> K;
        long double fs = fact[N] - fact[N - K + 1] - (K - 1) * log((long double)M) - fact[K];
        if (fs < (long double)0.0) cout << "Flush" << '\n';
        else cout << "Straight" << '\n';
    }
    return 0;
}
0