結果
問題 | No.227 簡単ポーカー |
ユーザー |
![]() |
提出日時 | 2019-09-03 16:37:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 596 bytes |
コンパイル時間 | 1,539 ms |
コンパイル使用メモリ | 172,616 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 05:55:56 |
合計ジャッジ時間 | 2,207 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int t; map<int,int> a; for(int i=0;i<5;i++){ cin>>t; a[t]++; } for(auto i=a.begin();i!=a.end();i++){ if(i->second==3){ if(a.size()==2)cout<<"FULL HOUSE"<<endl; else cout<<"THREE CARD"<<endl; return 0; } } for(auto i=a.begin();i!=a.end();i++){ if(i->second==2){ if(a.size()==3)cout<<"TWO PAIR"<<endl; else cout<<"ONE PAIR"<<endl; return 0; } } cout<<"NO HAND"<<endl; return 0; }