Yacht or Dice Poker

Problem #75

Tags: games random arrays implementation c-1 c-0

Who solved this?

No translations... yet

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:

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.

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