Company: Lam Research_7aug
Difficulty: medium
Tug of War Problem Description The game "Tug of War" is being played between opponents on one side wins by pulling the other side towards it completely. A lot of players have lined up to play the game. Every player is given a weight index Wi on the basis of their weight in the range of 3 to 9. The task of the organizers is to make the total weight index equal on both sides before the game starts, while making sure the maximum number of people can participate in the game. Note: The people on each side should be picked consecutively. Assume that solution do exist for all the testcases. Write a program to help the organizers by reading the input from STDIN and writing the output to STDOUT. Do not write arbitrary strings while reading the input and while printing as these contribute to the standard output. Constraints 10 > W >= 0 The number of players after weight index equalization should be equal on both sides otherwise print "0" (without quotes). Input Format The input contains th