結果

問題 No.227 簡単ポーカー
ユーザー KKT89
提出日時 2019-12-17 02:25:49
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 546 bytes
コンパイル時間 1,300 ms
コンパイル使用メモリ 83,616 KB
最終ジャッジ日時 2025-01-08 11:50:47
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
using namespace std;
typedef long long int ll;

int main(){
	vector<int> a(14);
	for (int i = 0; i < 5; i++) {
		int A; cin >> A;
		a[A]++;
	}
	sort(a.begin(), a.end());
	reverse(a.begin(), a.end());
	if (a[0] == 3 && a[1] == 2) cout << "FULL HOUSE" << endl;
	else if (a[0] == 3) cout << "THREE CARD" << endl;
	else if (a[0] == 2 && a[1] == 2) cout << "TWO PAIR" << endl;
	else if (a[0] == 2) cout << "ONE PAIR" << endl;
	else cout << "NO HAND" << endl;
}
0