結果
| 問題 |
No.1220 yukipoker
|
| コンテスト | |
| ユーザー |
poohbear
|
| 提出日時 | 2020-09-04 22:16:13 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 287 ms / 2,000 ms |
| コード長 | 849 bytes |
| コンパイル時間 | 2,026 ms |
| コンパイル使用メモリ | 194,176 KB |
| 最終ジャッジ日時 | 2025-01-14 05:53:47 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
#define rep(a,n) for (int a = 0; a < (n); ++a)
using namespace std;
using ll = long long;
typedef pair<int,int> P;
typedef pair<ll,P> PP;
typedef vector<vector<int> > Graph;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF = 1e18;
int main(){
vector<double>lg(2e5,0.0);
for(int i=1;i<1e5+5;i++){
lg[i]=lg[i-1]+log(i);
}
ll q;
cin >> q;
rep(i,q){
double n,m,k;
cin >> n >> m >> k;
double F,S;
F = log(m)+lg[n]-lg[k]-lg[n-k];
S = k*log(m)+log(n-k+1);
if(F>S){
cout << "Straight" << endl;
}
else{
cout << "Flush" << endl;
}
}
return 0;
}
poohbear