結果
| 問題 |
No.227 簡単ポーカー
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-14 07:05:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 583 bytes |
| コンパイル時間 | 664 ms |
| コンパイル使用メモリ | 55,528 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 13:32:20 |
| 合計ジャッジ時間 | 1,425 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#include <iostream>
#include <cstring>
using namespace std;
int main(){
int a;
int c[13];
int h[2];
memset(c,0,sizeof(c));
memset(h,0,sizeof(h));
for(int i=0; i<5; ++i){
cin>>a;
c[a-1]++;
}
for(int i=0; i<13; ++i){
if(c[i]==2){
h[0]++;
} else if(c[i]==3){
h[1]++;
}
}
if(h[0]==1 && h[1]==1){
cout<<"FULL HOUSE"<<endl;
} else if(h[1]==1){
cout<<"THREE CARD"<<endl;
} else if(h[0]==2){
cout<<"TWO PAIR"<<endl;
} else if(h[0]==1){
cout<<"ONE PAIR"<<endl;
} else {
cout<<"NO HAND"<<endl;
}
return 0;
}