結果
| 問題 | No.227 簡単ポーカー | 
| コンテスト | |
| ユーザー |  vain0 | 
| 提出日時 | 2015-06-19 22:29:13 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 1,374 bytes | 
| コンパイル時間 | 594 ms | 
| コンパイル使用メモリ | 79,404 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-07 04:05:07 | 
| 合計ジャッジ時間 | 964 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 | 
ソースコード
#include <cassert>
#include <functional>
#include <set>
#include <ctime>
#include <cmath>
#include <climits>
#include <cstring>
#include <string>
#include <queue>
#include <map>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#ifndef ONLINE_JUDGE //POJ
# include <complex>
# include <random>
# include <array>
# define mkt make_tuple
# define empb emplace_back
#endif
#ifdef _LOCAL
# include "for_local.h"
#endif
using namespace std;
typedef unsigned int uint; typedef long long ll; typedef unsigned long long ull;
#define repi(_I, _B, _E) for(int _I = (_B); (_I) < (_E); ++ (_I))
#define rep(_I, _N) for(int _I = 0; (_I) < (_N); ++ (_I))
#define mkp make_pair
#define all(_X) (_X).begin(), (_X).end()
inline int scani() { int n; scanf("%d", &n); return n; }
int b[13] {};
signed main() {
	rep(i, 5) {
		int a;
		cin >> a; --a;
		b[a] ++;
	}
	bool one_pair = false, two_pair = false, three_cards = false;
	rep(i, 13) {
		if ( b[i] == 2 ) {
			if ( one_pair ) two_pair = true;
			one_pair = true;
		}
		if ( b[i] == 3 ) three_cards = true;
	}
	
	if ( one_pair && three_cards ) {
		cout << "FULL HOUSE" << endl;
	} else if ( three_cards ) {
		cout << "THREE CARD" << endl;
	} else if ( two_pair ) {
		cout << "TWO PAIR" << endl;
	} else if ( one_pair ) {
		cout << "ONE PAIR" << endl;
	} else {
		cout << "NO HAND" << endl;
	}
	return 0;
}
            
            
            
        