結果
問題 |
No.227 簡単ポーカー
|
ユーザー |
|
提出日時 | 2015-12-06 19:04:58 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 628 bytes |
コンパイル時間 | 448 ms |
コンパイル使用メモリ | 59,760 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-14 16:01:05 |
合計ジャッジ時間 | 1,173 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 3 |
ソースコード
#include <iostream> #include <vector> using namespace std; #define SAY(s) {cout << s << "\n"; return 0;} int main(){ cin.tie(0); ios::sync_with_stdio(false); int input; vector<int> card(13, 0); int two_cnt=0, three_cnt=0; for(int i=0; i<5; ++i){ cin >> input; ++card[input]; } for(int i=0; i<13; ++i){ if(card[i]==2) ++two_cnt; else if(card[i]==3) ++three_cnt; } if(three_cnt==1 && two_cnt==1) SAY("FULL HOUSE"); if(three_cnt==1 && two_cnt==0) SAY("THREE CARD"); if(three_cnt==0 && two_cnt==2) SAY("TWO PAIR"); if(three_cnt==0 && two_cnt==1) SAY("ONE PAIR"); SAY("NO HAND"); }