#K33877. Rectangle Areas Comparison
Rectangle Areas Comparison
Rectangle Areas Comparison
You are given a list of rectangles defined by their width and height. Your task is to compare the sum of areas of rectangles at even indices and odd indices (0-indexed). Specifically, for a rectangle with width (w) and height (h), its area is (w \times h). The rectangles at indices 0, 2, 4, ... contribute to the even-index sum, and the ones at indices 1, 3, 5, ... contribute to the odd-index sum. If the sum of areas at odd indices is greater than the sum at even indices, print odds win
. If the sum at even indices is greater, print evens win
. If both sums are equal, print tie
.
This problem requires you to read input from standard input (stdin) and print the result to standard output (stdout).
inputFormat
The first line of input contains a single integer (N) denoting the number of rectangles. Each of the following (N) lines contains two space-separated integers (w) and (h) representing the width and height of a rectangle, respectively.
outputFormat
Output a single string which can be one of the following: odds win
, evens win
, or tie
, based on the comparison of the accumulated areas.## sample
0
tie