結果

問題 No.227 簡単ポーカー
ユーザー 158b158b
提出日時 2015-06-19 22:24:40
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 955 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 73,772 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-21 09:54:49
合計ジャッジ時間 1,306 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <climits>
#include <vector>
#include <numeric>
#include <complex>
#include <map>
#include <bitset>
using namespace std;

//#define __int64 long long
#define long __int64
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
const int Vecy[4] = {0,-1,0,1};
const int Vecx[4] = {1,0,-1,0};


int main(){
	int a[5];
	int cnt[13] = {0};
	int pair[2] = {0};
	int result;
	for(int i=0; i<5; i++){
		cin >> a[i];
		cnt[ a[i] - 1] ++;
	}
	
	for(int i=0; i<13; i++){
		if(cnt[i] == 2){
			pair[0] ++;
		}else if(cnt[i] == 3){
			pair[1] ++;
		}
	}
	
	result = pair[0] * 10 + pair[1];
	if(result == 11){
		cout << "FULL HOUSE" << endl;
	}else if(result == 10){
		cout << "THREE CARD" << endl;
	}else if(result == 2){
		cout << "TWO PAIR" << endl;
	}else if(result == 1){
		cout << "ONE PAIR" << endl;
	}else{
		cout << "NO HAND" << endl;
	}
    
    return 0;
}
0