結果

問題 No.227 簡単ポーカー
コンテスト
ユーザー not_522
提出日時 2015-07-15 02:39:39
言語 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  
実行時間 -
コード長 505 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 857 ms
コンパイル使用メモリ 180,040 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-30 00:42:01
合計ジャッジ時間 1,711 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

using namespace std;

int main() {
  array<int, 13> c{0};
  for (int i = 0; i < 5; ++i) {
    int a;
    cin >> a;
    ++c[a];
  }
  if (count(c.begin(), c.end(), 3) && count(c.begin(), c.end(), 2)) cout << "FULL HOUSE" << endl;
  else if (count(c.begin(), c.end(), 3)) cout << "THREE CARD" << endl;
  else if (count(c.begin(), c.end(), 2) == 2) cout << "TWO PAIR" << endl;
  else if (count(c.begin(), c.end(), 2)) cout << "ONE PAIR" << endl;
  else cout << "NO HAND" << endl;
}
0