結果

問題 No.227 簡単ポーカー
ユーザー evawenis
提出日時 2020-06-09 17:18:14
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 422 bytes
コンパイル時間 2,892 ms
コンパイル使用メモリ 198,964 KB
最終ジャッジ日時 2025-01-11 00:30:54
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	vector<int>a(14,0);
	for(int i=0;i<5;++i){
		int A; cin>>A;
		++a.at(A);
	}
	sort(a.rbegin(),a.rend());
	string ans;
	if(a.at(0)==3){
		if(a.at(1)==2)ans="FULL HOUSE"s;
		else ans="THREE CARD"s;
	}
	else if(a.at(0)==2){
		if(a.at(1)==2)ans="TWO PAIR"s;
		else ans="ONE PAIR"s;
	}
	else ans="NO HAND"s;
	cout<<ans<<"\n"s;
}
0