結果
問題 | No.1220 yukipoker |
ユーザー |
![]() |
提出日時 | 2020-09-18 02:27:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 183 ms / 2,000 ms |
コード長 | 532 bytes |
コンパイル時間 | 1,288 ms |
コンパイル使用メモリ | 167,012 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-22 07:30:34 |
合計ジャッジ時間 | 3,754 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;ll N, M, K;double f[100001]{};void solve() {double F = log(M) + f[N] - f[K] - f[N - K];double S = log(M) * K + log(N - K + 1);if (F < S) {cout << "Flush\n";} else {cout << "Straight\n";}}int main() {int Q;cin >> Q;for (int i = 0; i < 100000; i++) {f[i + 1] = f[i] + log(i + 1);}for (int i = 0; i < Q; i++) {cin >> N >> M >> K;solve();}return 0;}