All problems

Sharing an Axis Across Subplots

mediumPythonMatplotlibsharex/sharey

Halewood Reporting publishes a weather panel for a farming client: temperature above, rainfall below, both across the same run of days. The two panels are locked to the same horizontal scale, so a point in the upper panel always sits directly over the same day in the lower one — without that lock, the two panels choose their own scales and a reader lining them up by eye is comparing different days. The caption names the hottest day.

Task: Print the day label of the hottest day. If two or more days tie for hottest, print the label of whichever appears earliest in the list. The answer is the day's own label as given, not its position in the list.

Input

The first line holds an integer n, the number of days. Each of the next n lines holds three fields separated by single spaces: the day label as a whole number, then that day's temperature, then its rainfall. n is at least 1.

Output

One line holding the day label as a whole number.

Example:

Input:
3
1 70 0
2 85 1
3 68 2

Output:
2

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…