結果
問題 | No.227 簡単ポーカー |
ユーザー |
![]() |
提出日時 | 2017-07-09 09:20:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 446 bytes |
コンパイル時間 | 761 ms |
コンパイル使用メモリ | 67,544 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-07 04:16:44 |
合計ジャッジ時間 | 1,464 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include<iostream> #include<cstdio> #include<map> #include<string> using namespace std; int main() { string h[5] = { "NO HAND","ONE PAIR","TWO PAIR","THREE CARD","FULL HOUSE" }; map<int, int> mp; for (int i = 0; i < 5; i++) { int A; cin >> A; mp[A] += 1; } int ans = 0; for (auto i = mp.begin(); i != mp.end(); i++) { if (i->second == 3) ans += 3; else if (i->second == 2) ans += 1; } cout << h[ans] << endl; return 0; }