結果

問題 No.227 簡単ポーカー
ユーザー Kurichan0806
提出日時 2017-12-05 15:42:39
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 688 bytes
コンパイル時間 808 ms
コンパイル使用メモリ 88,012 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-28 16:38:54
合計ジャッジ時間 1,494 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <iomanip>
#include <cmath>
#include <functional>
using namespace std;
#define diff(x,y) ((x > y) ? (x - y) : (y - x))
#define us(x) (x > 0) ? x : x * -1

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