Go Back
Tug Of War (0)
Description

SIES GST is hosting annual Tug of war competition you are making some predictions you know the power levels of the competitors now you have decided to write a program to find out the winning team.

Input

The first line contains T numbers of test case.
The second line of input contain an integer t denoting the players per team.
a[1],a[2],a[3]...... is the power of each player of team is given alternatively.
[
For example-
3
a b c d e f
a c and f are of team 1
b d and e are of team 2
]

Output

If team 1 wins print 1
if team 2 wins print 2
If match ends in a draw print 0

Constraints

1<=T<=100
1<=a[i]<=100

Example
Copy Input

Input:
2
4
2 3 4 6 7 9 8 10
2
1 1 1 1
2
3 4 5 3
Output:
201

Explanation

Team 1`s power was 21 and Team 2`s power was 28 since team 2 was powerful Team 2 won in first case.

Universe
Contest open for 1 year with playlists problems



Announcement


Supported by our Coding Partner