

You may assume that 1 ≤ Si ≤ 1000 and 1 ≤ Ti ≤ 1000. Line i+1 contains two integer Si and Ti, the scores of the Player 1 and 2 respectively, in round i.

Lines 2,3.,N+1 describe the scores of the two players in the N rounds. The first line of the input will contain a single integer N (N ≤ 10000) indicating the number of rounds in the game. You may assume that the scores will be such that there will always be a single winner. Your task is to help the Manager find the winner and the winning lead. The winner of this game is Player 1 as he had the maximum lead (58 at the end of round 1) during the game. The total scores of both players, the leader and the lead after each round for this game is given below: Once all the rounds are over the player who had the maximum lead at the end of any round in the game is declared the winner.Ĭonsider the following score sheet for a game with 5 rounds: In his version, at the end of each round the leader and her current lead are calculated.

The Manager of Siruseri Sports Club decided to add his own twist to the game by changing the rules for determining the winner. The Siruseri Sports Club organises an annual billiards game where the top two players of Siruseri play against each other. Once all the rounds have been played, the total score of each player is determined by adding up the scores in all the rounds and the player with the higher total score is declared the winner. The game consists of several rounds and in each round both players obtain a score, based on how well they played. Well, there is more to it, but for our purposes this is sufficient. The game of billiards involves two players knocking 3 balls around on a green baize table. Problem 2: The Lead Game, (K Narayan Kumar, CMI) I believe my solution is correct, but dont't know why the site says that my answer is wrong, maybe you can help.
