0 Judge
Code: 0
Poker is a popular card game worldwide, which was played from the 18th century in a variety of forms. A standard deck of poker cards has 52 cards divided into four suits, with each suit having the 13 ranks. In the Chinese area, "Big Two" and "Thirteen Cards" are two popular poker games based on the ranking of different combinations of cards. If we want to design such computer poker games, we need to write a program that can recognize card combinations. Suppose that we simplify the requirement as follows: Without considering the types of suits but only concerning about the ranks of cards, try to determine the card combination from any six given cards. If we use integer numbers to represent card ranks, the possible card combinations are described below:
Suppose that we use integer numbers from 1 to 13 to represent the card ranks. Please write a program to determine the card combination from six input numbers.
The first input line contains one integer number $T$, indicating the number of test cases. Each test case includes six integer numbers (with each number from 1 to 13) that are separated by a single white space.
You may assume:
Show the name of the card combination for each input test case using the namespace of single, one pair, two pairs, three pairs, one triple, two triples, tiki, tiki pair, and full house.
5
4 3 4 3 12 10
5 4 2 3 6 12
10 12 10 12 12 8
8 5 8 8 5 5
2 10 6 10 10 10
two pairs
single
full house
two triples
tiki
撲克牌是一種國際盛行的卡牌遊戲,有很多種玩法,據傳最早源自18世紀。標準撲克牌共52張牌,包含四種花色,每一花色共13張不同點數的牌。在華人地區盛行的撲克牌玩法有大老二和十三支,主要是比較牌型組合的大小。如果想要利用電腦設計這些撲克牌遊戲,就必須寫程式自動判斷各種牌型。假設我們簡化牌型的判斷條件如下: 在不看花色與只看牌點的條件下,每次從給定的6張牌中,決定牌型是哪一種。如果使用整數數字代表不同的牌點,則可能的牌型描述如下:
假設使用整數數字1至13代表不同點數的牌卡,請寫一個程式從每行輸入的6個數字中判讀是以上哪一種牌型。
第一行輸入包含一個整數$T$,表示測試的牌型數量。每一個測試牌型包括6個落於1至13的整數數字,數字間用單一空格區隔。
可假設:
輸出每一行的牌型名稱,牌型名稱請用對應的英文名稱,即single、one pair、two pairs、three pairs、one triple、two triples、tiki、tiki pair或full house。