結果
| 問題 |
No.227 簡単ポーカー
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-06 19:05:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 630 bytes |
| コンパイル時間 | 731 ms |
| コンパイル使用メモリ | 58,292 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 16:01:07 |
| 合計ジャッジ時間 | 1,052 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#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-1];
}
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");
}