結果

問題 No.227 簡単ポーカー
ユーザー hirokazu1020hirokazu1020
提出日時 2015-06-19 22:30:05
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 822 bytes
コンパイル時間 650 ms
コンパイル使用メモリ 76,796 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-21 09:57:45
合計ジャッジ時間 1,423 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 2 ms
4,504 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,384 KB
testcase_08 AC 2 ms
4,384 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,384 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<sstream>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())
#define indexOf(v,x) (find(all(v),x)-v.begin())




int main(){
	int c[15]={},p[15];
	int a,h;
	rep(i,5){
		cin>>a;
		++c[a-1];
	}
	rep(i,15)p[i]=c[i];
	sort(p,p+15,greater<int>());
	if(p[0]==3&&p[1]==2){
		cout<<"FULL HOUSE";
	}else if(p[0]==3){
		cout<<"THREE CARD";
	}else if(p[0]==2&&p[1]==2){
		cout<<"TWO PAIR";
	}else if(p[0]==2){
		cout<<"ONE PAIR";
	}else{
		cout<<"NO HAND";
	}cout<<endl;

	return 0;
}
0