結果
問題 |
No.227 簡単ポーカー
|
ユーザー |
![]() |
提出日時 | 2015-07-15 02:39:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 505 bytes |
コンパイル時間 | 1,131 ms |
コンパイル使用メモリ | 159,236 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-07-08 07:35:29 |
合計ジャッジ時間 | 1,838 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 3 |
ソースコード
#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; }