結果
| 問題 | No.227 簡単ポーカー | 
| コンテスト | |
| ユーザー |  ui_mtc | 
| 提出日時 | 2020-03-20 22:10:11 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 684 bytes | 
| コンパイル時間 | 1,889 ms | 
| コンパイル使用メモリ | 175,060 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-15 06:10:28 | 
| 合計ジャッジ時間 | 2,238 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 | 
ソースコード
#include <bits/stdc++.h>
#define int long long
using namespace std;
using Graph = vector<vector<int>>;
signed main(){
  
  map<int, int> num;
  for( int i = 0; i < 5; i++ ){
    int A;
    cin >> A;
    if( num.count(A) ) num.at(A)++;
    else num[A] = 1;
  }
  
  int two = 0;
  int three = 0;
  for( auto p : num ){
    if( p.second == 2 ) two++;
    else if( p.second == 3 ) three++;
  }
  
  if( two == 1 && three == 0 ) cout << "ONE PAIR" << endl;
  else if( two == 2 ) cout << "TWO PAIR" << endl;
  else if( two == 0 && three == 1 ) cout << "THREE CARD" << endl;
  else if ( three == 1 && two == 1 ) cout << "FULL HOUSE" << endl;
  else cout << "NO HAND" << endl;
  
  
  
}
            
            
            
        