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 <vector>
#include <algorithm>
#include <cstdio>
#include <string>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

int cd[5]={0},cnt=0;

char k;
	while(!cin.eof()){
		cin >> cd[0] >> k >>cd[1] >>k >>cd[2] >>k >>cd[3] >>k >>cd[4];
		if(cin.eof()) break;
		
		sort(cd,cd+5);
		int mxp=0,cn1,cn2=0;
		rep(i,5){
			cn1=0;
			rep2(j,i+1,5) if(cd[i]==cd[j]) cn1++;
			cn2 += cn1; 
			mxp = max(mxp,cn1);
		}
//		printf("%d,%d\n",mxp,cn2);
		string yak = "straight";
		rep(i,4) if(cd[i] +1 != cd[i+1]) yak="null";
		if(cd[0]==1 && cd[1]==10 && cd[2]==11 && cd[3]==12 && cd[4]==13)
					yak = "straight";
		if(mxp==1 && cn2==1) yak ="one pair";
		if(mxp==1 && cn2==2) yak ="two pair";
		if(mxp==2 && cn2==3) yak ="three card";
		if(mxp==2 && cn2==4) yak ="full house";
		if(mxp==3) yak ="four card";
		cout << yak << endl;
		cnt++; if(cnt>50) break;
	}	
	
	return 0;
	
	
}

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

const int N = 5;
int c[N];

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

bool isTwoPair() {
  int num = 0;
  for(int i = i; i < N; ++i) {
    if(c[i-1] == c[i]) {
      ++num;
      while(c[i-1] == c[i]) ++i;
    }
  }
  return num == 2;
}

int main() {
  string s;
  while(cin >> s) {
    replace(s.begin(), s.end(), ',', ' ');
    stringstream ss(s);
    for(int i = 0; i < N; ++i) ss >> c[i];
    sort(c,c+N);
    if(c[0] == c[3] || c[1] == c[4]) {
      cout << "four card" << endl;
    } else if(c[0] == c[2] && c[3] == c[4] ||
	      c[0] == c[1] && c[2] == c[4]) {
      cout << "full house" << endl;
    } else if(isStraight()) {
      cout << "straight" << endl;
    } else if(c[0] == c[2] || c[1] == c[3] || c[2] == c[4]) {
      cout << "three card" << endl;
    } else if(isTwoPair()) {
      cout << "two pair" << endl;
    } else if(c[0] == c[1] || c[1] == c[2] || c[2] == c[3] || c[3] == c[4]) {
      cout << "one pair" << endl;
    } else {
      cout << "null" << endl;
    }
  }
 return 0;
}

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

int main(){
  vector<int> hand(5);
  char c;
  
  while(cin >> hand[0]>>c>>hand[1]>>c>>hand[2]>>c>>hand[3]>>c>>hand[4]){
    vector<int> cnt(15, 0);
    for(int i=0; i<5; i++){
      cnt[hand[i]]++;
      if(hand[i] == 1) cnt[14]++;
    }
    bool flag = false;

    // four card
    for(int i=1; i<=13; i++){
      if(cnt[i] == 4){
        cout << "four card" << endl; flag = true;
      }
    }
    if(flag) continue;

    // three card or full house
    for(int i=1; i<=13; i++){
      if(cnt[i] == 3){
        for(int j=1; j<=13; j++){
          if(cnt[j] == 2){
            cout << "full house" << endl; flag = true;
          }
        }
        if(flag) break;
        cout << "three card" << endl; flag = true;
      }
    }
    if(flag) continue;

    // two pair or one pair
    for(int i=1; i<=13; i++){
      if(cnt[i] == 2){
        for(int j=i+1; j<=13; j++){
          if(cnt[j] == 2){
            cout << "two pair" << endl; flag = true;
          }
        }
        if(flag) break;
        cout << "one pair" << endl; flag = true;
      }
    }
    if(flag) continue;

    // straight
    for(int i=1; i<=13; i++){
      if(cnt[i] == 1 && cnt[i+1] == 1 && cnt[i+2] == 1 && cnt[i+3] == 1 && cnt[i+4] == 1){
        cout << "straight" << endl; flag = true;
      }
    }
    if(flag) continue;

    //null
    cout << "null" << endl;
  }

}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	vector<int> c(5);
	char a;
	while(cin >> c[0] >> a >> c[1] >> a >> c[2] >> a >> c[3] >> a >> c[4]){
		bool yaku=false;
		int cnt[5]={0};
		sort(c.begin(),c.end());
		if((c[0]==(c[1]-1) && c[0]==(c[2]-2) && c[0]==(c[3]-3) && c[0]==(c[4]-4)) || (c[0]==1 && c[1]==10 && c[2]==11 && c[3]==12 && c[4]==13)) {cout << "straight" << endl ; continue;} 
		for(int i=0;i<5;++i){
			for(int j=i+1;j<5;++j){
				if(c[i]==c[j] && c[i]!=-1) cnt[i]++, c[j]=-1; 
			}
		}
		for(int i=0;i<5;++i){
			if(cnt[i]==3) {cout << "four card" << endl;yaku=true; break;}
			else if(cnt[i]==2) {
				if(cnt[3]==1) {cout << "full house" << endl; yaku=true;  break;}
				else {cout << "three card" << endl; yaku=true; break;}
			}
			else if(cnt[i]==1) {
				if(cnt[2]==2) {cout << "full house" << endl;yaku=true; break;}
				else if (cnt[i+2]==1) {cout << "two pair" << endl; yaku=true; break;}
				else {cout << "one pair" << endl; yaku=true; break;} 
			}
		}
		if (!yaku) cout << "null" << endl;
	}
	return 0; 
}