結果
| 問題 | No.227 簡単ポーカー |
| コンテスト | |
| ユーザー |
kyo1
|
| 提出日時 | 2020-03-24 00:32:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 586 bytes |
| コンパイル時間 | 1,591 ms |
| コンパイル使用メモリ | 166,796 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 20:41:49 |
| 合計ジャッジ時間 | 2,329 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
vector<int> cnts(5, 0);
vector<int> A(15, 0);
for (int i = 0; i < 5; i++) {
int a;
cin >> a;
A[a]++;
cnts[A[a] - 1]--;
cnts[A[a]]++;
}
if (cnts[3] == 1 && cnts[2] == 1) {
cout << "FULL HOUSE" << '\n';
} else if (cnts[3] == 1) {
cout << "THREE CARD" << '\n';
} else if (cnts[2] == 2) {
cout << "TWO PAIR" << '\n';
} else if (cnts[2] == 1) {
cout << "ONE PAIR" << '\n';
} else {
cout << "NO HAND" << '\n';
}
return 0;
}
kyo1