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 <cstdio>
#include <algorithm>
#include <string>
using namespace std;

int str(int a[5], int n){
	int tmp = a[n], i;
	for(i = 0;i < 4 && ++tmp == a[++n];i++){if(tmp == 13 && i == 2)tmp = 0, n = -1;}
	//cout << endl;
	if(i == 4)return 1;
	else return 0;
}

int main(){
	string s[]={"one pair","two pair","three card","straight","full house","four card","null"};
	int a[5], t[13], ans;
	while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])){
		ans = -1;
		sort(a, a+5);
		for(int i = 0;i < 13;i++)t[i] = count(a, a+5,i+1);
		
		for(int i = 0;i < 13;i++){
			if(t[i] == 3)ans = 2;
			if(ans == 0 && t[i] == 2)ans = 1;
			if(ans == -1 && t[i] == 2)ans = 0;
		}
		//for(int i = 0;i < 5;i++)cout << a[i] << " ";
		if(str(a, 0) || str(a, 1))ans = 3;
		int th = 0, tw = 0, fo = 0;
		for(int i = 0;i < 13;i++){
			if(t[i] == 2)tw = 1;
			if(t[i] == 3)th = 1;
			if(t[i] == 4)fo = 1;
		}
		if(tw && th)ans = 4;
		if(fo)ans = 5;
		if(ans == -1)ans = 6;
		//for(int i = 0;i < 5;i++)printf("%d ", a[i]);
		//for(int i = 0;i < 13;i++)cout << t[i] << " ";
		//cout << "fo" << fo;
		//cout << endl;
		//cout << ans;
		cout << s[ans] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
using namespace std;

string yaku(vector<int> v) {
    int num[13] = {};
    for (int x : v) num[x-1] ++;

    int c2 = 0, c3 = 0, c4 = 0;
    bool straight = false;
    for (int i=0; i<13; ++i) {
        c4 += (num[i] == 4);
        c3 += (num[i] == 3);
        c2 += (num[i] == 2);
        if (i+4 < 13) {
            straight |= (num[i] && num[i+1] && num[i+2] && num[i+3] && num[i+4]);
        }
    }
    straight |= (num[0] && num[9] && num[10] && num[11] && num[12]);

    if (straight) return "straight";
    if (c3 & c2) return "full house";
    if (c4) return "four card";
    if (c3) return "three card";
    if (c2 == 2) return "two pair";
    if (c2) return "one pair";
    return "null";
}

int main() {
    vector<int> v(5);
    char c;
    while (cin>>v[0]>>c>>v[1]>>c>>v[2]>>c>>v[3]>>c>>v[4]) {
        cout << yaku(v) << endl;
    }
    return 0;
}

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

using namespace std;

int main(){
  for(;;){
    int occ[14]={};
    for(int i=0;i<5;i++){
      int h;
      cin>>h;
      cin.ignore();
      if(!cin)return 0;
      occ[h]++;
    }
    int me=*max_element(occ,occ+14);
    int c2=count(occ,occ+14,2);
    int *lr=find(occ,occ+14,1);
    if(me==4){
      cout<<"four card"<<endl;
    }else if(me==3 && c2){
      cout<<"full house"<<endl;
    }else if(count(lr,lr+5,1)==5 || count(occ+10,occ+14,1)==4&&occ[1]){
      cout<<"straight"<<endl;
    }else if(me==3){
      cout<<"three card"<<endl;
    }else if(c2==2){
      cout<<"two pair"<<endl;
    }else if(c2==1){
      cout<<"one pair"<<endl;
    }else{
      cout<<"null"<<endl;
    }
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <map>
#include <algorithm>
using namespace std;

int main(){
  typedef map<int,int> Imap;
  int n;
  while(scanf("%d,",&n)>0){
    Imap h;
    h[n]++;
    for(int i=1;i<4;i++){
      scanf("%d,",&n);
      h[n]++;
    }
    scanf("%d",&n);
    h[n]++;
    if(h.size()==2){
      for(Imap::iterator it=h.begin();it!=h.end();it++){
	if(it->second==4){
	  cout<<"four card";
	  break;
	}
	else if(it->second==3){
	  cout<<"full house";
	  break;
	}
      }
    }
    else if(h.size()==3){
      for(Imap::iterator it=h.begin();it!=h.end();it++){
	if(it->second==3){
	  cout<<"three card";
	  break;
	}
	else if(it->second==2){
	  cout<<"two pair";
	  break;
	}
      }
    }
    else if(h.size()==4) cout<<"one pair";
    else{
      int m[5];
      int i=0;
      for(Imap::iterator it=h.begin();it!=h.end();it++) m[i++]=it->first;
      sort(m,m+5);
      for(int j=0;j<4;j++){
	if(m[j+1]!=m[j]+1&&!(m[j]==1&&m[j+1]==10)){
	  cout<<"null";
	  break;
	}
	if(j==3) cout<<"straight";
      }
    }
    cout<<endl;
  }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main() {
  int card[5];
  while(scanf("%d,%d,%d,%d,%d", 
	      &card[0], &card[1], &card[2], &card[3], &card[4]) != EOF) {
    sort(&card[0], &card[4] + 1);

    int data1[5];
    int kumi = -1;
    int before = 0;
    int count = 1;

    for(int i = 0; i < 5; i++) {
      if(card[i] != before) {
	data1[++kumi] = 1;
      } else {
	data1[kumi]++;
      }
      before = card[i];
    }
    kumi++;
    if(kumi == 2) {
      if(data1[0] == 4 || data1[1] == 4) {
	cout << "four card" << endl;
      } else if(data1[0] == 3 || data1[1] == 3) {
	cout << "full house" << endl;
      }
    }
    if(kumi == 3) {
      if(data1[0] == 3 || data1[1] == 3 || data1[2] == 3) {
	cout << "three card" << endl;
      } else if(data1[0] == 1 || data1[1] == 1 || data1[2] == 1) {
	cout << "two pair" << endl;
      }
    }
    if(kumi == 4) {
      cout << "one pair" << endl;
    }
    if(kumi == 5) {
      bool flag = false;
      for(int i = 0; i+1 < 5; i++) {
	if(card[i+1] - card[i] != 1) {
	  break;
	}
	if((i+1)+1 == 5) flag = true;
      }
      if(card[0] == 1 && card[1] == 10 &&
	 card[2] == 11 && card[3] == 12 && card[4] == 13) flag = true;

      if(flag) {
	cout << "straight" << endl;
      } else {
	cout << "null" << endl;
      }
    }
  }
  return 0;
}