At the intersection
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given an N×N table, where the "excitement" of a row or column is defined as the sum of its numbers, your task is to find the number located at the intersection of the most excited row and the least excited column. If there are multiple such intersections, choose the one that is highest up in the table, and among those, the leftmost.
Input
The first line of the input contains the integer N (1 ≤ N ≤ 100). The following N lines each contain N natural numbers, representing the table. Each number in the table is a natural number not exceeding 100000.
Output
Output a single number, which is the solution to the problem.
Examples
Input #1
Answer #1
Submissions 488
Acceptance rate 56%