結果

問題 No.1220 yukipoker
ユーザー 沙耶花沙耶花
提出日時 2020-09-04 22:11:54
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 625 bytes
コンパイル時間 2,451 ms
コンパイル使用メモリ 199,700 KB
実行使用メモリ 7,900 KB
最終ジャッジ日時 2023-08-17 15:47:12
合計ジャッジ時間 4,892 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
7,568 KB
testcase_01 AC 10 ms
7,736 KB
testcase_02 AC 10 ms
7,672 KB
testcase_03 AC 10 ms
7,756 KB
testcase_04 AC 8 ms
7,496 KB
testcase_05 AC 9 ms
7,612 KB
testcase_06 AC 9 ms
7,812 KB
testcase_07 AC 10 ms
7,568 KB
testcase_08 AC 10 ms
7,760 KB
testcase_09 AC 10 ms
7,580 KB
testcase_10 AC 10 ms
7,820 KB
testcase_11 AC 78 ms
7,808 KB
testcase_12 AC 84 ms
7,572 KB
testcase_13 AC 174 ms
7,668 KB
testcase_14 AC 159 ms
7,636 KB
testcase_15 AC 106 ms
7,812 KB
testcase_16 AC 118 ms
7,636 KB
testcase_17 AC 72 ms
7,620 KB
testcase_18 AC 89 ms
7,812 KB
testcase_19 AC 172 ms
7,504 KB
testcase_20 AC 170 ms
7,672 KB
testcase_21 AC 10 ms
7,744 KB
testcase_22 AC 10 ms
7,684 KB
testcase_23 AC 10 ms
7,900 KB
testcase_24 AC 10 ms
7,624 KB
testcase_25 AC 10 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define modulo 1000000007
#define mod(mod_x) ((((long long)mod_x+modulo))%modulo)
#define Inf 1000000000000000000	

int main(){

	vector<double> LOG(300000,0.0);
	vector<double> LOGS(300000,0.0);
	for(int i=1;i<300000;i++){
		LOG[i] = log(i);
		LOGS[i] = LOGS[i-1] + LOG[i];
	}
	
	int Q;
	cin>>Q;
	
	rep(_,Q){
		int N,M,K;
		scanf("%d %d %d",&N,&M,&K);
		
		double L = LOG[M] + LOGS[N],R = LOG[M] * K + LOGS[K] + LOGS[N-K] + LOG[N-K+1];
		if(L>R){
			cout<<"Straight"<<endl;
		}
		else{
			cout<<"Flush"<<endl;
		}
	}
	
	return 0;
}
0