Given six card ranks, count how often each rank appears and print which of the nine named poker combinations the hand forms.
Easy3Hash mapImplementationSimulationInterviewNo attempts yetTime limit1sMemory limit512 MBPoker is a card game that has been played in many forms since the 18th century. A standard poker deck has 52 cards split into four suits, and each suit holds 13 ranks. In Chinese speaking regions, Big Two and Thirteen Cards are two well known poker games that compare the ranking of card combinations. Writing such a game as a program requires code that recognizes a combination of cards.
The task here is a simplified version. Suits are ignored and only ranks matter. Given six cards, decide which combination they form. When ranks are written as integers, nine combinations are possible.
Ranks are integers from 1 to 13. The nine combinations do not overlap, so any six cards that satisfy the constraints belong to exactly one of them. Write a program that reads six numbers and reports the combination.
The first line contains the number of test cases T. Each of the following T lines contains six integers separated by a single space.
For each test case, print the name of the card combination on its own line, in input order. The name is one of single, one pair, two pairs, three pairs, one triple, two triples, tiki, tiki pair, full house, written in lowercase exactly as listed.