Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"sort"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), ",")
		cards := make([]int, 5)
		for i :=range input {
			cards[i], _ = strconv.Atoi(input[i])
		}
		sort.Sort(sort.IntSlice(cards))
		if cards[0] == cards[1] && cards[2] == cards[3] && cards[2] == cards[1] {
			fmt.Println("four card")
		} else if cards[1] == cards[2] && cards[3] == cards[4] && cards[3] == cards[2]{
			fmt.Println("four card")
		} else if cards[0] == cards[1] && cards[1] == cards[2] && cards[3] == cards[4] {
			fmt.Println("full house")
		} else if cards[0] == cards[1] && cards[2] == cards[3] && cards[3] == cards[4] {
			fmt.Println("full house")
		} else if cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13 {
			fmt.Println("straight")
		} else if cards[0]+1 == cards[1] && cards[1]+1 == cards[2] && cards[2]+1 == cards[3] && cards[3]+1 == cards[4] {
			fmt.Println("straight")
		} else if (cards[0] == cards[1] && cards[1] == cards[2]) || (cards[1] == cards[2] && cards[2] == cards[3]) || (cards[2] == cards[3] && cards[3] == cards[4]) {
			fmt.Println("three card")
		} else if ((cards[0] == cards[1]) && ((cards[2] == cards[3]) || (cards[3] == cards[4]))) || ((cards[1] == cards[2]) && (cards[3] == cards[4])) {
			fmt.Println("two pair")
		} else if cards[0] == cards[1] || cards[1] == cards[2] || cards[2] == cards[3] || cards[3] == cards[4] {
			fmt.Println("one pair")
		} else {
			fmt.Println("null")
		}
	}
}

C++: #include<iostream>
#include<string>
#include<string.h>
using namespace std;

int Result(int cards[5]){
	int num_card[13];
	bool four=false, three=false, two=false;
	int	num_two=0;
	int min = 12,max = 0;

	for(int i=0;i<13;++i)num_card[i]=0;

	for(int i=0;i<5;++i){
		num_card[ cards[i] - 1 ] ++;
	}



	for(int i=0;i<13;++i){

		if(num_card[i]>0){
			if(i<min)min=i;
			if(i>max)max=i;

			if(num_card[i]==4)four=true;
			else if(num_card[i]==3)three=true;
			else if(num_card[i]==2){
				two=true;
				++num_two;
			}
		}
	}

	if(four)return 7;
	else if(three){
		if(two)return 6;
		else return 4;
	}
	else if(two){
		if(num_two == 2)return 3;
		else return 2;
	}

	if(max-min+1 == 5)
		return 5;

	return 1;
}
int strtoint(char *s){
	int n=0;
	while(*s!='\0'){
		n += n*10 + *s - '0';
		s++;
	}
	return n;
}

void toint(char *s, int cards[5]){

	char *tp;

	tp = strtok(s,",");
	cards[0] = strtoint(tp);

	for(int i=1;i<5;++i){
		tp = strtok(NULL,",");
		cards[i] = strtoint(tp);

	}





}

int main(){

	char s[32];
	string res;
	int card[5];	

	cin >> s;

	toint(s,card);

	switch( Result(card) ){
		case 1:res="null";break;
		case 2:res="one pair";break;
		case 3:res="two pair";break;
		case 4:res="three card";break;
		case 5:res="straight";break;
		case 6:res="full house";break;
		case 7:res="four card";break;
	}

	cout << res << endl;

	

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;

int card[13];
int solve(){
    int m;
    vector<int> n;
    for(int i=0;i<13;i++){
        if(card[i]) n.push_back(card[i]);
    }
    for(int i=0;i<n.size();i++){
        for(int j=1;j<n.size()-i;j++){
            if(n[j-1] < n[j]) swap(n[j-1], n[j]);
        }
    }
    for(int i=0;i<n.size();i++){
        cout << n[i] << " ";
    }
    cout << endl;
    if(n.size()==2){
        if(n[0] == 4){
            cout << "four card" << endl;
        }else{
            cout << "full house" << endl;
        }
    }else if(n.size()==3){
        if(n[0] == 3){
            cout << "three card" << endl;
        }else{
            cout << "two pair" << endl;
        }
    }else if(n.size()==4){
        cout << "one pair" << endl;
    }else{
        bool straight=false;
        for(int i=0;i<13-3;i++){
            if(card[i]&&card[i+1]&&card[i+2]&&card[i+3]&&card[(i+4)%13]){
                cout << "straight" << endl;
                straight=true;
                break;
            }
        }
        if(!straight){
            cout << "null" << endl;
        }
    }
}

int main(){
    char comma;
    int m;
    while(cin >> m){
        for(int i=0;i<13;i++){
            card[i] = 0;
        }
        m--;
        card[m]++;
        for(int i=0;i<4;i++){
            cin >> comma >> m;
            m--;
            card[m]++;
        }
        solve();
    }
}

C++: #include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int FourCard(vector<int>);
int HullHouse(vector<int>);
int Straight(vector<int>);
int ThreeCard(vector<int>);
int TwoPair(vector<int>);
int OnePair(vector<int>);

int main(){
  int a,b,c,d,e;
  char c1,c2,c3,c4;
  vector<int> card;

  while(cin >> a >> c1 >> b >> c2 >> c >> c3 >> d >> c4 >> e){
    card.push_back(a);
    card.push_back(b);
    card.push_back(c);
    card.push_back(d);
    card.push_back(e);

    sort(card.begin(), card.end());

    if(FourCard(card) == 1)
      cout << "four card" << endl;
    else if(HullHouse(card) == 1)
      cout << "hull house" << endl;
    else if(Straight(card) == 1)
      cout << "straight" << endl;
    else if(ThreeCard(card) == 1)
      cout << "three card" << endl;
    else if(TwoPair(card) == 1)
      cout << "two pair" << endl;
    else if(OnePair(card) == 1)
      cout << "one pair" << endl;
    else
      cout << "null" << endl;

    card.clear();
  }

  return 0;
}

int FourCard(vector<int> x){
  int i;
  for(i=0; i<2; ++i){
    if(x[i] == x[i+1] && x[i] == x[i+2] && x[i] == x[i+3])
      return 1;
  }
  return 0;
}

int HullHouse(vector<int> x){
  if((x[0] == x[1] && x[0] == x[2] && x[3] == x[4])||(x[0] == x[1] && x[2] == x[3] && x[2] == x[4]))
    return 1;
  else
    return 0;
}

int Straight(vector<int> x){
  if(x[0] == x[1]-1 && x[0] == x[2]-2 && x[0] == x[3]-3 && x[0] == x[4]-4)
    return 1;
  else if(x[0] == 1 && x[1] == 10 && x[2] == 11 && x[3] == 12 && x[4] == 13)
    return 1;
  else
    return 0;
}

int ThreeCard(vector<int> x){
  int i;
  for(i=0;i<3; ++i){
    if(x[i] == x[i+1] && x[i] == x[i+2])
      return 1;
  }
  return 0;
}

int TwoPair(vector<int> x){
  int i;
  if((x[0] == x[1] && x[2] == x[3])||(x[0] == x[1] && x[3] == x[4])||(x[1] == x[2] && x[3] == x[4]))
    return 1;
  else return 0;
}

int OnePair(vector<int> x){
  int i;
  for(i=0; i<4; ++i){
    if(x[i] == x[i+1])
      return 1;
  }
  return 0;
}

C++: # -*- coding: utf-8 -*-


def is_four_card(d):
    return 4 in d.values()


def is_full_house(d):
    return 3 in d.values() and 2 in d.values()


def is_straight(d):
    flag = [False, 0]
    for i in d.values():
        if flag[0] == True and flag[1] == 5:
            return True

        if i == 1:
            flag[0] = True
            flag[1] += 1
    return False


def is_three_card(d):
    return 3 in d.values()


def is_two_pair(d):
    return list(d.values()).count(2) == 2


def is_one_pair(d):
    return list(d.values()).count(2) == 1


def judge(d):
    if is_four_card(d):
        print('four card')
    elif is_full_house(d):
        print('full house')
    elif is_straight(d):
        print('straight')
    elif is_three_card(d):
        print('three card')
    elif is_two_pair(d):
        print('two pair')
    elif is_one_pair(d):
        print('one pair')
    else:
        print('null')


def solve(cards):
    d = {k: 0 for k in range(1, 14)}
    for card in cards:
        d[card] += 1
    judge(d)

_input = input().split(",")
solve(_input)