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<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int main(void)
{
    int card[5];
    while(scanf("%d",&card[0])!=EOF)
    {
        for(int i=1;i<5;i++)scanf(",%d",&card[i]);
        sort(card,card+5);
        if(card[0]+1==card[1]&&card[1]+1==card[2]&&card[2]+1==card[3]&&card[3]+1==card[4])printf("straight\n");
        else if(card[0]+12==card[4]&&card[1]+1==card[2]&&card[2]+1==card[3]&&card[3]+1==card[4])printf("straight\n");
        else if(card[0]==card[1])
        {
            if(card[1]==card[2])
            {
                if(card[2]==card[3])printf("four card\n");
                else if(card[3]==card[4])printf("full house\n");
                else printf("three card\n");
            }
            else if(card[2]==card[3])
            {
                if(card[3]==card[4])printf("full house\n");
                else printf("two pair\n");
            }
            else if(card[3]==card[4])printf("two pair\n");
            else printf("one pair\n");
        }
        else if(card[1]==card[2])
        {
            if(card[2]==card[3])
            {
                if(card[3]==card[4])printf("four card\n");
                else printf("three card\n");
            }
            else if(card[3]==card[4])printf("two card\n");
            else printf("one pair\n");
        }
        else if(card[2]==card[3])
        {
            if(card[3]==card[4])printf("three card\n");
            else printf("one pair\n");
        }
        else if(card[3]==card[4])printf("one pair\n");
        else printf("null\n");
    }
    return 0;
}

C++: #include<algorithm>
#include<iostream>
#include<stdio.h>
#include<string.h>

int main()
{
	int card[5];
	
	while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
	 	
		int a[20];
		memset( a, 0, sizeof( a ) );
		int c = 0;
		
		for( int i = 0; i < 5; i++ ) a[card[i]]++;
		
		for( int i = 0; i < 5; i++ ){
			 c = std::max( c, std::count( card, card + 5, card[i] ) );
		}
		
		bool f = false;
		int m;
		
		switch( c ){
			case 4:
		 		puts( "four card" );
				break;
			case 3:
				for( int i = 0; i < 5; i++ ){
			 		if( std::count( card, card + 5, card[i] ) == 2 ){
						f = true; 
						break;
					}
				}
				
				if( f ){
				 	puts( "full house" );
				}
				else{
				 	puts( "three card" );
				}
				break;
			case 2:
				for( int i = 0; i < 5; i++ ){
					if( std::count( card, card + 5, card[i] ) == 2 && !f ){
					 	m = card[i];
						f = true;
					}
					if( card[i] != m && std::count( card, card + 5, card[i] ) == 2 && f ){
						puts( "two pair" );
						goto end;
					}
				}
				puts( "one pair" );
				break;
			case 1:	
				for( int i = 1; i <= 10; i++ ){
					if( a[i] == 1 && a[i+1] == 1 && a[i+2] == 1 && a[i+3] == 1 && a[(i+4)%13] == 1 ) f = true;
				}
				
				if( f ){
				 	puts( "straight" );
				}
				else{
					puts( "null" );
				}
				
				break;
		}
		
	end:
	}

 	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 25;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };


string _str[ 7 ] = { "null", "one pair", "two pair", "three card", "straight", "full house", "four card" };
int ans = 0;
int _hand[ 5 ];

int main() {
	while ( ~scanf( "%d,%d,%d,%d,%d", &_hand[ 0 ], &_hand[ 1 ], &_hand[ 2 ], &_hand[ 3 ], &_hand[ 4 ] ) ) {
		for ( int i = 0; i < 5; i++ ) {
			if ( _hand[ i ] == 1 ) {
				_hand[ i ] += 13;
			}
		}
		sort( _hand, _hand + 5 );
		ans = 0;
		bool is_straight = true;
		for ( int i = 0; i < 4; i++ ) {
			if ( _hand[ i + 1 ] - _hand[ i ] != 1 ) {
				is_straight = false;
				break;
			}
		}
		if ( is_straight ) {
			ans = 4;
		}
		bool is_three_card = false;
		bool is_one_pair = false;
		for ( int i = 2; i <= 14; i++ ) {
			int many = upper_bound( _hand, _hand + 5, i ) - lower_bound( _hand, _hand + 5, i );
			if ( many == 4 ) {
				ans = 6;
				break;
			}
			if ( many == 3 ) {
				is_three_card = true;
				ans = 3;
				if ( is_one_pair ) {
					ans = 5;
					break;
				}
			}
			if ( many == 2 ) {
				if ( is_one_pair ) {
					ans = 2;
					break;
				}
				if ( is_three_card ) {
					ans = 5;
					break;
				}
				is_one_pair = true;
				ans = 1;
			}
		}
		printf( "%s\n", _str[ ans ].c_str() );
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
char a[][11]={"null","one pair","two pair","three card","straight","full house","four card"};
long i,h,f,hh[14];
char c;
while(cin>>h){
for(i=0;i<13;i++)hh[i]=0;
hh[h-1]++;
for(i=1;i<5;i++){cin>>c>>h;hh[h-1]++;}
f=0;
for(i=0;i<13;i++)cout<<hh[i];
cout<<endl;
for(i=0;i<13;i++){
if(hh[i]==4){
f=6;
}else if(hh[i]==3){
if(f==1)f=5;else f=3;
}else if(hh[i]==2){
if(f==3)f=5;
else if(f==1)f=2;
else f=1;
}
}
if(f==0){
  for(i=0;i<13;i++)if(hh[i]==1)break;
  if(i<9){
  if(hh[i+1]==1)
  if(hh[i+2]==1)
  if(hh[i+3]==1)
  if(hh[i+4]==1)f=4;
  }
  if(i==0){
  if(hh[i+9]==1)
  if(hh[i+10]==1)
  if(hh[i+11]==1)
  if(hh[i+12]==1)f=4;
  }
}
cout<<a[f]<<endl;
}
return 0;
}