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<algorithm>
using namespace std;
int main() {
	int l[5];
	char c;
	while (cin) {
		cin >> l[0] >> c;
		cin >> l[1] >> c;
		cin >> l[2] >> c;
		cin >> l[3] >> c;
		cin >> l[4];
		sort(l, l + 5);
		if (l[0] == l[1] && l[1] == l[2] && l[2] == l[3])
			cout << "four card";
		else if (l[4] == l[1] && l[1] == l[2] && l[2] == l[3])
			cout << "four card";
		else if (l[0] == l[1] && l[1] == l[2] && l[4] == l[3])
			cout << "full house";
		else if (l[0] == l[1] && l[3] == l[2] && l[4] == l[3])
			cout << "full house";
		else if (l[4] == l[3] + 1 && l[3] == l[2] + 1 && l[2] == l[1] + 1 && l[1] == l[0] + 1)
			cout << "straight";
		else if (l[0] == 1 && l[1] == 10 && l[2] == 11 && l[3] == 12 && l[4] == 13)
			cout << "straight";
		else if (l[0] == l[1] && l[1] == l[2])
			cout << "three card";
		else if (l[3] == l[1] && l[1] == l[2])
			cout << "three card";
		else if (l[3] == l[4] && l[3] == l[2])
			cout << "three card";
		else if (l[0] == l[1] && l[2] == l[3])
			cout << "two pair";
		else if (l[0] == l[1] && l[4] == l[3])
			cout << "two pair";
		else if (l[2] == l[1] && l[4] == l[3])
			cout << "two pair";
		else if (l[0] == l[1] || l[1] == l[2] || l[2] == l[3] || l[3] == l[4])
			cout << "one pair";
		else cout << "null";
		cout << endl;
	}
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<list>
using namespace std;
int inf = 1000000000;

int main(void) {
  vector<int> t(5);
  vector<string> s = {"null", "one pair", "two pair", "three card", "straight", "full house", "four card"};
  while( scanf("%d,%d,%d,%d,%d", &t[0], &t[1], &t[2], &t[3], &t[4]) != EOF ){
    sort(t.begin(), t.end());
    vector<int> c(14, 0);
    for(int i=0; i<5; i++) c[ t[i] ]++;
    int two = 0, thr = 0, four = 0;
    for(int i=0; i<14; i++){
      if( c[i] == 2 ) two++;
      if( c[i] == 3 ) thr++;
      if( c[i] == 4 ) four++;
    }

    int ans = 0;
    if( four == 1 ) ans = 6;
    else if( thr == 1 && two == 1 ) ans = 5;
    else if( t[0] + 1 == t[1] && t[1] + 1 == t[2] && t[2] + 1 == t[3] && t[3] + 1 == t[4] ) ans = 4;
    else if( t[0] == 1 && t[1] == 10 && t[2] == 11 && t[3] == 12 && t[4] == 13 ) ans = 4;
    else if( thr == 1 ) ans = 3;
    else if( two == 2 ) ans = 2;
    else if( two == 1 ) ans = 1;

    cout << s[ans] << endl;
  }

  return 0;
}

// EOF

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

using namespace std;
int a[5];
bool is_straight()
{
  for (int i = 1; i < 5; i++) {
    if (a[i] != a[i - 1] + 1) {
      goto next;
    }
  }
  return true;
 next:
  if (a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13) {
    return true;
  }
  return false;
}


int main()
{
  while (scanf("%d" , &a[0]) == 1) {
    for (int i = 1; i < 5; i++) {
      scanf(",%d", &a[i]);
    }
    sort(a, &a[5]);
    /*for (int i = 0; i < 5; i++) {
      printf("%d ", a[i]);
    }
    printf("\n");*/
    vector<int> mx_v;
    int mx = 1;

    for (int i = 1; i < 5; i++) {
      if (a[i] == a[i - 1]) {
	mx++;
      } else {
	mx_v.push_back(mx);
	mx = 1;

      }
    }
    mx_v.push_back(mx);
    mx = *max_element(mx_v.begin(), mx_v.end());
    /*for (int i = 0; i < mx_v.size(); i++) {
      printf("mx[%d] = %d\n", i, mx_v[i]);
    }
    printf("mx = %d\n", mx);*/
    if (mx == 1) {
      if (is_straight()) {
	printf("straight\n");
	goto end;
      } else {
	printf("null\n");
	goto end;
      }
    } else if (mx == 2) {
      int c = 0;
      for (int i = 0; i < mx_v.size(); i++) {
	if (mx_v[i] == mx) {
	  c++;
	}
      }
      if (c >= 2) {
	printf("two pair\n");
	goto end;
      } else {
	printf("one pair\n");
	goto end;
      }
    } else if (mx == 3) {
      //printf("size = %d\n",mx_v.size());
      for (int i = 0;  i < mx_v.size(); i++) {
	if (mx_v[i] == 2) {
	  printf("full house\n");
	  goto end;
	}
      }
      printf("three card\n");
      goto end;
    } else if (mx == 4 || mx == 5) {
      printf("four card\n");
      goto end;
    } else {
      printf("null\n");
      goto end;
    }
  end:;
  }
}

C++: #include <bits/stdc++.h>
using namespace std;

string hands( const vector<int>& c ) {
	int n = (int)c.size();

	int p1 = 0;
	int c3 = 0;

	for( int i = 0; i < n; ++i ) {
		if( c[i] == 4 ) {
			return "four card";
		}
		else if( c[i] == 3 ) { c3 += 1; }
		else if( c[i] == 2 ) { p1 += 1; }
	}

	if( c3 > 0 && p1 > 0 ) {
		return "full house";
	}
	else if( c3 > 0 ) {
		return "three card";
	}
	else if( p1 == 2 ) {
		return "two pair";
	}
	else if( p1 == 1 ) {
		return "one pair";
	}

	int x = 0;
	for( int i = 0; i <= n; ++i ) {
		x = (c[i%n] == 1) ? (x+1) : 0;

		if( x == 5 ) { break; }
	}

	return x == 5 ? "straight" : "null";
}

int main() {
	ios_base::sync_with_stdio( false );

	string line;
	while( getline( cin, line ) ) {
		replace( line.begin(), line.end(), ',', ' ' );

		istringstream iss( line );
		vector<int> cnt( 13 );
		int cd;
		while( iss >> cd ) { cnt[cd-1] += 1; }

		cout << hands( cnt ) << '\n';
	}

	return 0;
}

C++: #include<iostream>
#include<array>
int main()
{
	while (true)
	{
		int a, b, c, d, e;
		char foo;
		std::cin >> a >> foo >> b >> foo >> c >> foo >> d >> foo >> e;
		if (std::cin.eof())
		{
			break;
		}
		std::array<int, 5>num = { a,b,c,d,e };
		std::sort(num.begin(), num.end());
		if (num[0] == num[3] || num[1] == num[4])
		{
			std::cout << "four card" << std::endl;
		}
		else if (num[0] == num[1] && num[2] == num[4] || num[0] == num[2] && num[3] == num[4])
		{
			std::cout << "full house" << std::endl;
		}
		else if (num[2] == num[1] + 1 && num[3] == num[1] + 2 && num[4] == num[1] + 3 && (num[0] == num[1] - 1 || num[0] == 1 && num[1] == 10))
		{
			std::cout << "straight" << std::endl;
		}
		else if (num[0]==num[2]||num[1]==num[3]||num[2]==num[4])
		{
			std::cout << "three card" << std::endl;
		}
		else
		{
			int pair = 0;
			for (int i = 0; i < 4; i++)
			{
				if (num[i] == num[i + 1])
				{
					pair++;
				}
			}
			switch (pair)
			{
			case 2:
				std::cout << "two pair" << std::endl;
				break;
			case 1:
				std::cout << "one pair" << std::endl;
				break;
			case 0:
				std::cout << "null" << std::endl;
				break;
			}
		}
	}
	return 0;
}