結果
| 問題 | No.227 簡単ポーカー | 
| コンテスト | |
| ユーザー |  ytft | 
| 提出日時 | 2021-03-18 22:07:42 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 591 bytes | 
| コンパイル時間 | 1,759 ms | 
| コンパイル使用メモリ | 166,916 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-17 04:19:54 | 
| 合計ジャッジ時間 | 2,719 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
    vector<int> cards(13);
    int input;
    int M=0;
    int variation=0;
    for(int i=0;i<5;i++){
        cin>>input;
        if(cards[input]==0){
            variation++;
        }
        cards[input]++;
        M=max(M,cards[input]);
    }
    if(variation==2 && M==3){
        cout<<"FULL HOUSE"<<endl;
    }else if(M==3){
        cout<<"THREE CARD"<<endl;
    }else if(M==2&&variation==3){
        cout<<"TWO PAIR"<<endl;
    }else if(M==2){
        cout<<"ONE PAIR"<<endl;
    }else{
        cout<<"NO HAND"<<endl;
    }
}
            
            
            
        