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 <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int countN( vector<int> hand, int n )
{
	int res = 0;

	for ( unsigned int i = 0; i < hand.size(); i++ )
	{
		if ( hand[i] == n )
		{
			res++;
		}
	}

	return res;
}

bool fourcard( vector<int> hand )
{
	map<int,int> cards;

	for ( unsigned int i = 0; i < hand.size(); i++ )
	{
		cards[ hand[i] ]++;
	}

	for ( map<int,int>::iterator it = cards.begin(); it != cards.end(); it++ )
	{
		if ( (*it).second == 4 )
		{
			return true;
		}
	}

	return false;
}

bool fullhouse( vector<int> hand )
{
	map<int,int> cards;
	bool two, three;
	two = three = false;

	for ( unsigned int i = 0; i < hand.size(); i++ )
	{
		cards[ hand[i] ]++;
	}

	for ( map<int,int>::iterator it = cards.begin(); it != cards.end(); it++ )
	{
		if ( (*it).second == 2 )
		{
			two = true;
		}
		if ( (*it).second == 3 )
		{
			three = true;
		}
	}

	return two && three;
}

bool straight( vector<int> hand )
{
	sort( hand.begin(), hand.end() );

	if ( hand[0] == 1 )
	{
		if ( hand[1] != 10 )
		{
			return false;
		}

		for ( unsigned int i = 1; i + 1 < hand.size(); i++ )
		{
			if ( hand[i] + 1 != hand[i+1] )
			{
				return false;
			}
		}
	}
	else
	{
		for ( unsigned int i = 0; i + 1 < hand.size(); i++ )
		{
			if ( hand[i] + 1 != hand[i+1] )
			{
				return false;
			}
		}
	}

	return true;
}

bool threecard( vector<int> hand )
{
	map<int,int> cards;

	for ( unsigned int i = 0; i < hand.size(); i++ )
	{
		cards[ hand[i] ]++;
	}

	for ( map<int,int>::iterator it = cards.begin(); it != cards.end(); it++ )
	{
		if ( (*it).second == 3 )
		{
			return true;
		}
	}

	return false;
}

bool twopair( vector<int> hand )
{
	int pairs = 0;
	map<int,int> cards;

	for ( unsigned int i = 0; i < hand.size(); i++ )
	{
		cards[ hand[i] ]++;
	}

	for ( map<int,int>::iterator it = cards.begin(); it != cards.end(); it++ )
	{
		if ( (*it).second == 2 )
		{
			pairs++;
		}
	}

	return pairs == 2;
}

bool onepair( vector<int> hand )
{
	map<int,int> cards;

	for ( unsigned int i = 0; i < hand.size(); i++ )
	{
		cards[ hand[i] ]++;
	}

	for ( map<int,int>::iterator it = cards.begin(); it != cards.end(); it++ )
	{
		if ( (*it).second == 2 )
		{
			return true;
		}
	}

	return false;
}

int main()
{
	string buffer;

	while ( cin >> buffer )
	{
		for ( unsigned int i = 0; i < buffer.length(); i++ )
		{
			if ( buffer[i] == ',' )
			{
				buffer[i] = ' ';
			}
		}

		istringstream iss( buffer );
		vector<int> hand;

		for ( int i = 0; i < 5; i++ )
		{
			int input;
			iss >> input;
			hand.push_back( input );
		}

		if ( fourcard( hand ) )
		{
			cout << "four card";
		}
		else if ( fullhouse( hand ) )
		{
			cout << "full house";
		}
		else if ( straight( hand ) )
		{
			cout << "straight";
		}
		else if ( threecard( hand ) )
		{
			cout << "three card";
		}
		else if ( twopair( hand ) )
		{
			cout << "two pair";
		}
		else if ( onepair( hand ) )
		{
			cout << "one pair";
		}
		else
		{
			cout << "null";
		}
		
		cout << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main( void )
{
	string in;
	while ( cin >> in )
	{
		replace( in.begin(), in.end(), ',', ' ' );
		istringstream is( in );
		vector <int> hands(5);
		for ( int i = 0; i < 5; i++ )
		{
			is >> hands[i];
		}

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

		bool straight = true;
		for ( int i = 0 ; straight && i < 4; i++ )
		{
			if ( i == 0 && hands[i] == 1 )
				continue;
			if ( hands[i+1] - hands[i] != 1 )
			{
				straight = false;
			}
		}

		if ( straight )
		{
			cout << "straight" << endl;
		}
		else
		{
			vector <int> cnt( 14, 0 );
			for ( int i = 0; i < 5; i++ )
			{
				cnt[ hands[i] ] ++;
			}

			sort( cnt.rbegin(), cnt.rend() );

			if ( cnt[0] == 4 )
			{
				cout << "four cards" << endl;
			}
			else if ( cnt[0] == 3 && cnt[1] == 2 )
			{
				cout << "full house" << endl;
			}
			else if ( cnt[0] == 3 )
			{
				cout << "three cards" << endl;
			}
			else if ( cnt[0] == 2 && cnt[1] == 2 )
			{
				cout << "two pair" << endl;
			}
			else if ( cnt[0] == 2 )
			{
				cout << "one pair" << endl;
			}
			else
			{
				cout << "null" << endl;
			}

		}

	}
}