結果
| 問題 | No.227 簡単ポーカー | 
| コンテスト | |
| ユーザー |  ytft | 
| 提出日時 | 2021-03-18 22:06:47 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 591 bytes | 
| コンパイル時間 | 1,680 ms | 
| コンパイル使用メモリ | 166,888 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-17 04:19:04 | 
| 合計ジャッジ時間 | 2,240 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 WA * 4 | 
ソースコード
#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 PAIR"<<endl;
    }
}
            
            
            
        