結果

問題 No.227 簡単ポーカー
ユーザー Series_205
提出日時 2019-10-22 19:42:26
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 384 bytes
コンパイル時間 668 ms
コンパイル使用メモリ 71,096 KB
最終ジャッジ日時 2025-01-08 00:50:59
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;
int a,x[14];
int main(){
    for(int i=0;i<5;i++){cin>>a; x[a]++;}
    sort(x,x+14);
    if(x[13]==3){
        if(x[12]==2)cout<<"FULL HOUSE\n";
        else cout<<"THREE CARD\n"; 
    }else if(x[13]==2){
        if(x[12]==2)cout<<"TWO PAIR\n";
        else cout<<"ONE PAIR\n";
    }else cout<<"NO HAND\n";
    return 0;
}
0