시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 1024 MB | 111 | 82 | 68 | 79.070% |
Mia is a dice game for two players. Each roll consist of two dice. Mia involves bluffing about what a player has rolled, but in this problem we focus only on its scoring rules. Unlike most other dice games, the score of a roll is not simply the sum of the dice.
Instead, a roll is scored as follows:
The input will contain multiple test cases. Each test case contains on a single line four integer numbers s0 s1 r0 r1 where s0 s1 represent the dice rolled by player 1 and r0 r1 represents the dice rolled by player 2. The input will be terminated by a line containing 4 zeros.
For each test case, output which player won, or whether there was a tie, using exactly the format shown below.
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.
High School > Virginia Tech High School Programming Contest > 2014 Virginia Tech High School Programming Contest A번