結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー chuka231
提出日時 2015-10-23 21:47:09
言語 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
結果
WA  
実行時間 -
コード長 726 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 508 ms
コンパイル使用メモリ 72,520 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-03 08:56:22
合計ジャッジ時間 816 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
using namespace std;
int a[14];

int main()
{
for(int i=0; i<5; i++) {
int x;
cin >> x;
a[x]++;
}

int three=0, two=0, one=0;

for(int i=1; i<14; i++)
if(a[i]==1) one++;
else if(a[i]==2) two++;
else if(a[i]==3) three++;

if(three==1 && two==1) cout << "FULL HOUSE" << endl;
//ある数をちょうど3つと、別の数をちょうど2つ含む。
else if(three==1 && one==2) cout << "THREE CARD" << endl;
//ある数をちょうど3つ含む。
else if(two==2) cout << "TWO PAIR" << endl;
//ある数をちょうど2つと、別の数をちょうど2つ含む。
else if (two==1 && three==0) cout << "ONE PAIR" << endl;
//ある数をちょうど2つ含む。
else cout << "NO HANDS" << endl;

return 0;
}
0