Dice game of Yacht is played with 5
standard dice (having from 1
to 6
points on their sides). The player's
goal is to gather some beautiful combination of points. Suppose, the following combinations are respected:
3 6 5 6 1
- called pair;2 4 5 4 4
- called three;1 4 1 1 1
- called four;2 2 2 2 2
- called yacht;3 6 5 3 5
- called two-pairs;1 6 6 1 6
- called full-house;1
to 5
, like 2 4 3 5 1
- called small-straight (see notes);2
to 6
, like 6 3 4 2 5
- called big-straight.Note1: combinations named with two words are written with dash, same as answers which our code
should produce.
Note2: "small-straight" should be called "little-straight", this was mistakenly borrowed from "Yachtzee"
game rules, where it denotes straight of 4 dice - but now it is too late to change checker code, sorry :)
Such combinations increase player's score by different values, but it is not important now.
Our goal is to write a program which for given combination of dice will determine its type.
Input data contains a number of test-cases in the first line.
Next lines contain 5
values each - points of player's dice.
Answer should contain the name for each of combinations. Names could be pair
, two-pairs
, three
,
four
, yacht
, full-house
, small-straight
, big-straight
or none
, separated with spaces.
Example:
input data:
3
3 6 5 6 1
1 6 6 1 6
2 4 3 5 1
answer:
pair full-house small-straight
You can read more about the game itself at wikipedia article on Yacht - do not be surprised of slightly different combinations set, it is not universally agreed upon.