結果
問題 | No.227 簡単ポーカー |
ユーザー |
![]() |
提出日時 | 2015-07-15 02:40:45 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 509 bytes |
コンパイル時間 | 1,083 ms |
コンパイル使用メモリ | 160,104 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 07:35:30 |
合計ジャッジ時間 | 1,637 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#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 - 1]; } 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; }