#include #include #define REP(i,n) for(int i=0;i> hand; card[hand]++; if(card[hand] > 1){ if(card[hand]==2) pair++; else if(card[hand]==3){ pair--; three++; }else{ three = 0; } } } cout << ((three && pair)?"FULL HOUSE":(three)?"THREE CARD":(pair==2)?"TWO PAIR":(pair)?"ONE PAIR":"NO HAND") << endl; }