結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー Div9851
提出日時 2016-01-06 21:57:01
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 551 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 829 ms
コンパイル使用メモリ 177,332 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-07 23:21:01
合計ジャッジ時間 1,731 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
int cnt[14];
int main() {
    int A;
    for(int i=0;i<5;i++) {
        scanf("%d",&A);
        cnt[A]++;
    }
    int two=0,three=0;
    for(int i=1;i<=13;i++) {
        if(cnt[i]==2) two++;
        else if(cnt[i]==3) three++;
    }
    if(two==1&&three==1) {
        printf("FULL HOUSE\n");
    }else if(three==1) {
        printf("THREE CARD\n");
    }else if(two==2) {
        printf("TWO PAIR\n");
    }else if(two==1) {
        printf("ONE PAIR\n");
    }else {
        printf("NO HAND\n");
    }
}
0