結果
問題 | No.1220 yukipoker |
ユーザー |
![]() |
提出日時 | 2020-09-04 21:43:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 195 ms / 2,000 ms |
コード長 | 763 bytes |
コンパイル時間 | 1,429 ms |
コンパイル使用メモリ | 166,172 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 12:23:15 |
合計ジャッジ時間 | 4,080 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#define _USE_MATH_DEFINES#include <bits/stdc++.h>using namespace std;//template#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)#define ALL(v) (v).begin(),(v).end()typedef long long int ll;const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}//enddouble fac[201010];int main(){int q; cin>>q;fac[0]=0;rep(i,1,101010)fac[i+1]=fac[i]+log(i+1);while(q--){int n,m,k; cin>>n>>m>>k;double x=log(m)+fac[n]-fac[n-k];double y=log(m)*k+fac[k]+log(n-k+1);if(x<y)puts("Flush"); else puts("Straight");}return 0;}