結果

問題 No.1220 yukipoker
ユーザー donutholedonuthole
提出日時 2020-09-05 11:34:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 331 ms / 2,000 ms
コード長 926 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 15,488 KB
最終ジャッジ日時 2024-05-05 22:59:19
合計ジャッジ時間 5,377 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
15,488 KB
testcase_01 AC 56 ms
15,488 KB
testcase_02 AC 55 ms
15,360 KB
testcase_03 AC 57 ms
15,360 KB
testcase_04 AC 56 ms
15,360 KB
testcase_05 AC 55 ms
15,360 KB
testcase_06 AC 52 ms
15,488 KB
testcase_07 AC 53 ms
15,488 KB
testcase_08 AC 57 ms
15,360 KB
testcase_09 AC 54 ms
15,488 KB
testcase_10 AC 56 ms
15,360 KB
testcase_11 AC 176 ms
15,488 KB
testcase_12 AC 209 ms
15,360 KB
testcase_13 AC 328 ms
15,488 KB
testcase_14 AC 312 ms
15,488 KB
testcase_15 AC 216 ms
15,360 KB
testcase_16 AC 254 ms
15,360 KB
testcase_17 AC 169 ms
15,488 KB
testcase_18 AC 207 ms
15,360 KB
testcase_19 AC 313 ms
15,488 KB
testcase_20 AC 331 ms
15,488 KB
testcase_21 AC 57 ms
15,360 KB
testcase_22 AC 56 ms
15,488 KB
testcase_23 AC 59 ms
15,488 KB
testcase_24 AC 58 ms
15,360 KB
testcase_25 AC 55 ms
15,488 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]
    tei = 100000
    for i in range(1, 10 ** 5 + 1):
        logfact.append(logfact[-1] + math.log(i, tei))
    q = ni()
    for _ in range(q):
        n, m, k = ns()
        f = math.log(m, tei) + logfact[n] - logfact[n - k] - logfact[k]
        s = k * math.log(m, tei) + math.log(n - k + 1, tei)

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


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