結果
問題 | No.1220 yukipoker |
ユーザー |
![]() |
提出日時 | 2020-09-05 11:34:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 310 ms / 2,000 ms |
コード長 | 924 bytes |
コンパイル時間 | 249 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 15,488 KB |
最終ジャッジ日時 | 2024-11-28 00:22:40 |
合計ジャッジ時間 | 4,905 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
import sysimport mathimport collectionsimport bisectimport itertoolsimport decimalimport copyfrom math import log2# import numpy as np# sys.setrecursionlimit(10 ** 6)INF = 10 ** 20# MOD = 10 ** 9 + 7# MOD = 998244353ni = 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 = 1000for 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()