Yacht or Dice Poker

Problem #75

Tags: games random arrays implementation

Who solved this?

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:

(combinates named with two words are written with dash here for consistency with answers which our code will produce)

Such combinations increases 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.

You need to login to get test data and submit solution.