結果
| 問題 |
No.1220 yukipoker
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-04 23:05:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 2,000 ms |
| コード長 | 698 bytes |
| コンパイル時間 | 870 ms |
| コンパイル使用メモリ | 84,496 KB |
| 最終ジャッジ日時 | 2025-01-14 06:22:23 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
using ldouble = long double;
constexpr int N = 200000;
std::vector<ldouble> fsum;
void init() {
fsum.resize(N);
fsum[0] = 0;
for (int i = 1; i < N; ++i) {
fsum[i] = fsum[i - 1] + std::log(i);
}
}
void solve() {
int n, m, k;
std::cin >> n >> m >> k;
auto flush = fsum[n] - fsum[k] - fsum[n - k] + std::log(m);
auto straight = std::log1p(n - k) + std::log(m) * k;
std::cout << (flush < straight ? "Flush" : "Straight") << "\n";
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
init();
int q;
std::cin >> q;
while (q--) solve();
return 0;
}