結果
| 問題 | No.1220 yukipoker |
| コンテスト | |
| ユーザー |
donuthole
|
| 提出日時 | 2020-09-04 22:51:05 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,143 bytes |
| 記録 | |
| コンパイル時間 | 360 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 850,956 KB |
| 最終ジャッジ日時 | 2024-11-26 20:46:05 |
| 合計ジャッジ時間 | 48,869 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 |
| other | MLE * 25 |
ソースコード
import sys
import math
import collections
import bisect
import itertools
import decimal
import copy
# 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===
# nCrの左項にはn以外も来るバージョン、1!~(n-1)!を保持
def prepare(n):
f = 1
factorials = [1]
for m in range(1, n + 1):
f *= m
factorials.append(f)
return factorials
def main():
# 使い方
lim = 10 ** 5 + 1
facts = prepare(lim)
q = ni()
for _ in range(q):
a, b, c = ns()
straight = pow(b, c) * (a - c + 1)
if a >= c:
flash = b * (facts[a] // facts[c] // facts[a - c])
else:
flash = 0
if straight > flash:
print("Flush")
else:
print("Straight")
if __name__ == '__main__':
main()
donuthole