Time limit: 1 seconds Memory limit: 256 MB topic description Gunnar and Emma play a lot of board in home, so they own many dice that is not normal 6-sided dice. For example they own a die that has ten sides with numbers, ..., and on it. There had been a big storm in Stockholm, so Gunnar and Emma had been stuck at home without electricity for a couple of ho Urs. They has finished playing all the games they has, so they came up with a new one. Each player has 2 dice which he or she rolls. The player with a bigger sum wins. If both sums is the same, the game ends in a tie. Given the description of Gunnar ' and Emma ' s dice, which player has higher chances of winning? All of their dice has the following Property:each die contains numbers a, a + 1, ..., b, where A and B is the lowest an D highest numbers respectively on the die. Each of the appears exactly on one side, so the die has b-a + 1 sides. Input formatThe first line contains four integers a1, B1, A2, B2 that describe Gunnar ' s dice. Die number I contains numbers AI, Ai + 1, ..., bi on its sides. Assume that 1 <= ai <= bi <= 100. You can further assume this each die have at least four sides and so AI + 3 <= bi. The second line contains the description of Emma's dice in the same format. Output formatOutput the name of the player that has higher probability of winning. The Output "Tie" if both players has same probability of winning. Sample input Copy sample input to ClipboardExample one: 1 4 1 41 6 1 6 Sample two: 1 8 1 81 10 2 5 Sample three: 2 5 2 71 5 2 5 Sample outputExample one: Emma Sample two: tie example three: Gunnar Problem source:2015 annual fourth game of the week A problem with water, look at the average is good
|