結果
| 問題 |
No.227 簡単ポーカー
|
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-01-22 12:48:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 695 bytes |
| コンパイル時間 | 2,215 ms |
| コンパイル使用メモリ | 62,148 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-25 22:20:33 |
| 合計ジャッジ時間 | 1,368 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 12 |
ソースコード
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main(){
vector<int> A;
int x,count=0;
bool flag1,flag2;
for(int i=0;i<5;i++){
cin >> x;
A.push_back(x);
}
A.push_back(0);
for(int i=0;i<5;i++){
if(A[i]==A[i+1]){
count++;
}
if(A[i]!=A[i+1]){
if(count==2) flag1 = 1;
else if(count==3) flag2 = 1;
count = 0;
}
}
if(flag1==1&&flag2==1) cout << "FULL HOUSE";
else if(flag1==1) cout << "TWO PAIR";
else if(flag2==1) cout << "THREE CARD";
else cout << "NO HAND";
return 0;
}
focus