結果

問題 No.1220 yukipoker
ユーザー anagohirame
提出日時 2020-03-26 16:19:25
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 228 ms / 2,000 ms
コード長 424 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 194,624 KB
最終ジャッジ日時 2025-01-09 10:22:51
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
	vector<double> log_cum(100001, 0.0);
	for (int i = 1; i < 100001; ++i) log_cum[i] = log_cum[i-1] + log(i);
	int q; cin >> q;
	for (int i = 0; i < q; ++i)
	{
		int n, m, k; cin >> n >> m >> k;
		double s = (k-1) * log(m) + log_cum[k] + log_cum[n-k+1];
		double f = log_cum[n];
		cout << (s > f ? "Flush" : "Straight") << endl;
	}
	return 0;
}
0