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>
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(hh[i+1]==1)
  if(hh[i+2]==1)
  if(hh[i+3]==1)
  if(hh[i+4]==1)f=4;
  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;
}

C++: #include <cstdio>
#include <vector>
using namespace std;
/* null
 * one pair
 * two pair
 * three card
 * straight
 * full house
 * four card
 * */
int main() {
	vector<int> cards(5);
	while (scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],
				&cards[3],&cards[4])) {
		vector<int> cnt(13, 0);
		for (int i=0; i<5; i++) cnt[cards[i]-1]++;
		int two = 0, three = 0, four = 0;
		for (int i=0; i<13; i++) {
			if (cnt[i] == 2) two++;
			if (cnt[i] == 3) three++;
			if (cnt[i] == 4) four++;
		}
		if (four == 1) {
			printf("four card\n");
			continue;
		} else if (two == 1 && three == 1) {
			printf("full house\n");
			continue;
		} else if (three == 1) {
			printf("three card\n");
			continue;
		} else if (two == 2) {
			printf("two pair\n");
			continue;
		} else if (two == 1) {
			printf("one pair\n");
			continue;
		}
		int c = 0;
		bool flag = false;
		for (int i=0; i<9; i++) {
			if (cnt[i] == 1) {
				if (cnt[i+1]==1&&cnt[i+2]==1&&cnt[i+3]==1&&
						cnt[i+4]==1) {
					flag = true;
					break;
				}
			}
		}
		if (flag||
				(cnt[9]==1&&cnt[10]==1&&cnt[11]==1&&cnt[12]==1&&cnt[0]==1)) {
			printf("straight\n");
		} else {
			printf("null\n");
		}
	}	
}

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

using namespace std;

int main(void){

  int card[5];
  char ten;

  while( cin >> card[0] ){
    cin >> ten >> card[1] >> ten >> card[2] >> ten >> card[3] >> ten >> card[4];

    sort( card , card + 5 );

    if( card[4] == card[1] || card[3] == card[0] ){// four card
      cout << "four card" << endl;
      goto end;
    }

    if( (card[0] == card[2] && card[3] == card[4]) || (card[0] == card[1] && card[2] == card[4] ) ){
      cout << "full house" << endl;
      goto end;
    }

    int cnt;
    int r;
    cnt = 0;
    r = card[0];
    for( int i = 1 ; i < 5 ; i++ ){// straight
      if( r + 1 == card[i] ){
	cnt++;
	r = card[i];
      }
      else r = card[i];
    }
    if( cnt == 4 ){
      cout << "straight" << endl;
      goto end;
    }
    else if( card[0] == 1  && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13 ){
      cout << "straight" << endl;
      goto end;
    }

    if( card[0] == card[2] || card[1] == card[3] || card[2] == card[4] ){// three card
      cout << "three card" << endl;
      goto end;
    }

    if( card[0] == card[1] && card[2] == card[3] ){// two pair
      cout << "two pair" << endl;
      goto end;
    }
    else if( card[0] == card[1] && card[3] == card[4] ){
      cout << "two pair" << endl;
      goto end;
    }
    else if( card[1] == card[2] && card[3] == card[4] ){
      cout << "two pair" << endl;
      goto end;
    }

    for( int i = 0 ; i < 4 ; i++ ){// two card
      if( card[i] == card[i+1] ){
	cout << "one pair" << endl;
	goto end;
      }
     }

      cout << "null" << endl;

  end:;
  }
  return 0;
}

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

int main(){
    int tmp[5];
    char com;
    while(cin >>tmp[0]>>com>>tmp[1]>>com>>tmp[2]>>com>>tmp[3]>>com>>tmp[4]){
    int hand[14]={};

    for(int i=0; i<5; ++i){
      if(tmp[i]==1)++hand[13];
      ++hand[tmp[i]-1];
    }

    int pair=0,three=0,str=0,four=0;
    for(int i=0; i<14; ++i){
      if(hand[i]==4){++four;}
      if(hand[i]==1)++str;
      if(hand[i]==2)++pair;
      if(hand[i]==3)++three;
      if(str!=5 && hand[i]==0)str=0;
    }
    if(hand[0]==hand[13] && hand[0]==2)--pair;
    if(four)cout << "four card" << endl;
    else if(three && pair)cout << "full house" << endl;
    else if(str >= 5)cout << "straight" << endl;
    else if(three)cout << "three card" << endl;
    else if(pair == 2)cout << "two pair" << endl;
    else if(pair == 1)cout << "one pair" << endl;
    else cout << "null" << endl;
  }   
}

C++: #include <iostream>
#include <cstdio>
#include <set>
#include <stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int card[5]={0};
	while(scanf("%d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4]) != EOF){
		set<int> poker;
		vector<int> p;
		for(int i=0;i<5;i++){
			poker.insert(card[i]);
			p.push_back(card[i]);
		}
		sort(p.begin(),p.end());
		int d=poker.size();
		switch(d){
		case 2:
			if(p[2]!=p[3] || p[1]!=p[2]) cout<<"full house"<<endl;
			else cout<<"four card"<<endl;
			break;
		case 3:
			if((p[0]==p[1] && p[1]==p[2])||(p[1]==p[2] && p[2]==p[3])||(p[2]==p[3] && p[3]==p[4])) cout<<"three card"<<endl;
			else cout<<"two pair"<<endl;
			break;
		case 4:
			cout<<"one pair"<<endl;
			break;
		case 5:
			if(p[1]==p[0]+1 && p[2]==p[1]+1 && p[3]==p[2]+1 && p[4]==p[3]+1) cout<<"straight"<<endl;
			else if(p[0]==1 && p[1]==10 && p[2]==11 && p[3]==12 && p[4]==13) cout<<"straight"<<endl;
			else cout<<"null"<<endl;
			break;
		}
	}
	return 0;
}