結果

問題 No.1220 yukipoker
ユーザー donutholedonuthole
提出日時 2020-09-05 11:23:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 223 ms / 2,000 ms
コード長 874 bytes
コンパイル時間 506 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 13,200 KB
最終ジャッジ日時 2023-08-18 17:19:26
合計ジャッジ時間 4,749 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
13,156 KB
testcase_01 AC 37 ms
13,096 KB
testcase_02 AC 35 ms
13,084 KB
testcase_03 AC 34 ms
13,084 KB
testcase_04 AC 34 ms
13,188 KB
testcase_05 AC 35 ms
13,104 KB
testcase_06 AC 34 ms
13,080 KB
testcase_07 AC 35 ms
13,120 KB
testcase_08 AC 34 ms
13,120 KB
testcase_09 AC 33 ms
13,164 KB
testcase_10 AC 35 ms
13,080 KB
testcase_11 AC 117 ms
13,140 KB
testcase_12 AC 124 ms
13,140 KB
testcase_13 AC 215 ms
13,112 KB
testcase_14 AC 205 ms
13,200 KB
testcase_15 AC 145 ms
13,084 KB
testcase_16 AC 167 ms
13,092 KB
testcase_17 AC 109 ms
13,148 KB
testcase_18 AC 137 ms
13,104 KB
testcase_19 AC 223 ms
13,060 KB
testcase_20 AC 223 ms
13,092 KB
testcase_21 AC 36 ms
13,056 KB
testcase_22 AC 34 ms
13,104 KB
testcase_23 AC 35 ms
13,084 KB
testcase_24 AC 36 ms
13,088 KB
testcase_25 AC 36 ms
13,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
# import math
import collections
import bisect
import itertools
import decimal
import copy
from math import log2

# import numpy as np

# sys.setrecursionlimit(10 ** 6)
INF = 10 ** 20
# MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline().rstrip())
ns = lambda: map(int, sys.stdin.readline().rstrip().split())
na = lambda: list(map(int, sys.stdin.readline().rstrip().split()))
na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split()))


# ===CODE===
def main():
    logfact = [0]
    for i in range(1, 10 ** 5 + 1):
        logfact.append(logfact[-1] + log2(i))

    q = ni()
    for _ in range(q):
        n, m, k = ns()
        f = log2(m) + logfact[n] - logfact[n - k] - logfact[k]
        s = k * log2(m) + log2(n - k + 1)

        print("Straight" if s<f else "Flush")


if __name__ == '__main__':
    main()
0