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 <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	const string yaku[] = {
		"null", "one pair", "two pair", "three card", "straight",
		"full house",	"four card" };
//	cut here before submit 
//	freopen("testcase.ph", "r", stdin);
	string str = "";
	while (getline (cin, str ) ){
		string res = "";
		if (str.empty() ){
			break;
		} // end if
		while (str.find(',') != string::npos ){
			str = str.replace(str.find(','), 1, " ");
		} // end while
		stringstream ss(str);
		vector <int> card (5, 0);
		int i,j;

		for (i = 0; i < 5; ++i){
			ss >> card[i];
		} // end for
		sort (card.begin(), card.end() );

//		for (i = 0; i < 5; ++i){
//			cout << card[i] << ' ';
//		} // end for
//		cout << endl;

		for (j = 0; j < 4; ++j){
			if (card[j + 1] == card[j] + 1){
				continue;
			}else{
				break;
			} // end if
		} // end for
		if (j == 4){
			res = yaku[4];	// "straight"
//			goto result;
		} // end if
		if (card[0] == 1 && card[1] == 10){
			for (j = 1; j < 4; ++j){
				if (card[j + 1] == card[j] + 1){
					continue;
				}else{
					break;
				} // end if
			} // end for
			if (j == 4){
				res = yaku[4];	// "straight"
//				goto result;
			} // end if
		} // end if
		if (res.empty() ){

			set <int> Card;
			for (i = 0; i < 5; ++i){
				Card.insert (card[i]);
			} // end for
//			set <int>::iterator it = Card.begin();
//			for (; it != Card.end(); ++it){
//				cout << *it << ' ';
//			} // end for
//			cout << endl;
//			cout << "card kind: " << Card.size() << endl;

			if (Card.size() == 5){
				res = yaku[0];		// null
			}else if (Card.size() == 4){
				res = yaku[1];		// one pair
			}else if (Card.size() == 3){
//				res = yaku[2];
				map<int, int> D;
				for (i = 0; i < 5; ++i){
					++D[card[i]];
				} // end for
				int maxnum = 0;
				map<int, int>::iterator it = D.begin();
				for (; it != D.end(); ++it){
					if (maxnum < (*it).second ){
						maxnum = (*it).second;
					} // end if
				} // end for
				if (maxnum == 2){
					res = yaku[2];	// two pair
				}else if (maxnum == 3){
					res = yaku[3];	// three card 
				} // end if

			}else{	// if (Card.size() == 2)
				map<int, int> D;
				for (i = 0; i < 5; ++i){
					++D[card[i]];
				} // end for
				int maxnum = 0;
				map<int, int>::iterator it = D.begin();
				for (; it != D.end(); ++it){
					if (maxnum < (*it).second ){
						maxnum = (*it).second;
					} // end if
				} // end for
				if (maxnum == 3){
					res = yaku[5];	// full house
				}else if (maxnum == 4){
					res = yaku[6];	// four card
				} // end if
			} // end if
		} // end if

		if (!res.empty() ){
			cout << res << endl;
		} // end if
	} // end while
		
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<vector>
#include<utility>
#include<queue>
#include<math.h>
#include<string>
#include<algorithm>
#include<stack>
#include<typeinfo>
using namespace std;
typedef pair<int, int> P;
int main() {
	char ch, straight, four, three, twop, onep;
	int check[5] = { 1,10,11,12,13 }, st = 0;
	int card[5];	while (cin >> card[0] >> ch >> card[1] >> ch >> card[2] >> ch >> card[3] >> ch >> card[4]) {
		int cnt[14] = { 0 };
		sort(card, card + 5);
		four = false;
		three = false;
		twop = false;
		onep = false;
		straight = true;
		st = 0;
		for (int i = 0; i < 5; ++i) {
			if (i != 0 && card[i - 1] + 1 != card[i])straight = false;
			if (card[i] == check[i])st++;
			cnt[card[i]]++;
		}
		if (st == 5)straight = true;
		for (int i = 0; i < 5; ++i) {
			if (i != 0 && card[i - 1] == card[i])continue;
			if (cnt[card[i]] == 4) {
				four = true;
				break;
			}
			else if (cnt[card[i]] == 3) three = true;
			else if (cnt[card[i]] == 2 && onep)twop = true;
			else if (cnt[card[i]] == 2)onep = true;
		}

		if (four)cout << "four card" << endl;
		else if (onep&&three)cout << "full house" << endl;
		else if (straight)cout << "straight" << endl;
		else if (three)cout << "three card" << endl;
		else if (twop)cout << "two pair" << endl;
		else if (onep)cout << "one pair" << endl;
		else cout << "null" << endl;


	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b,c,d,e;
	while(scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e)!=EOF)
	{
		int cards[13]={0};
		int dbl=0,thr=0,four=0,straight=0,tmp=0;
		cards[a-1]++; cards[b-1]++; cards[c-1]++; cards[d-1]++; cards[e-1]++;

		for(int i = 0; i < 13; ++i)
		{
			if(cards[i]==2) dbl++;
			else if(cards[i]==3) thr++;
			else if(cards[i]==4) four++;

			if(0<i&&cards[i]==1&&cards[i-1]==1) tmp++;
			straight=max(tmp,straight);
		}

		if(four) cout<<"four cards"<<endl;
		else if(thr&&dbl) cout<<"full house"<<endl;
		else if(straight==4||cards[0]==1&&cards[9]==1&&cards[10]==1&&cards[11]==1&&cards[12]==1) cout<<"straight"<<endl;
		else if(thr) cout<<"three cards"<<endl;
		else if(dbl==2) cout<<"two pairs"<<endl;
		else if(dbl) cout<<"one pair"<<endl;
		else cout<<"null"<<endl;
	}
  return 0;
}

C++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>
#include <climits>
#include <set>
#include <numeric>

using namespace std;

int t[5];

bool straight()
{
	if(t[0] == 1 && t[1] == 10 && t[2] == 11 && t[3] == 12 && t[4] == 13) return true;
	for (int i = 0; i < 4; i++){
		if(t[i+1]-t[i] != 1) return false;
	}
	return true;
}

int main()
{
	while(~scanf("%d,%d,%d,%d,%d",t,t+1,t+2,t+3,t+4)){
		sort(t,t+5);
		if(t[0] == t[3] || t[1] == t[4])
			puts("four card");
		else if( (t[0] == t[1] && t[2] == t[4]) || (t[0] == t[2] && t[3] == t[4]))
			puts("full house");
		else if(straight())
			puts("straight");
		else if(t[0] == t[2] || t[1] == t[3] || t[2] == t[4])
			puts("three card");
		else if( (t[0] == t[1] && (t[2] == t[3] || t[3] == t[4])) || (t[1] == t[2] && t[3] == t[4]) )
			puts("two pair");
		else if( t[0] == t[1] || t[1] == t[2] || t[2] == t[3] || t[3] == t[4])
			puts("one pair");
		else 
			puts("null");
	}
	return 0;
}