Problem D
Mia

Instead, a roll is scored as follows:
-
Mia (
or ) is always highest. -
Next come doubles (
, , and so on). Ties are broken by value, with being highest. -
All remaining rolls are sorted such that the highest number comes first, which results in a two-digit number. The value of the roll is the value of that number, e.g.
and becomes .
Input
The input will contain multiple, distinct test cases. Each
test case contains on a single line four integers
Output
For each test case, output which player won, or whether there was a tie, using exactly the format shown below.
Sample Input 1 | Sample Output 1 |
---|---|
1 2 1 3 3 3 2 1 6 6 4 4 6 5 1 1 4 2 2 4 0 0 0 0 |
Player 1 wins. Player 2 wins. Player 1 wins. Player 2 wins. Tie. |