At the intersection
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 122.174 megabytes
There is an N×N table. The liveliness of a row or column is defined as the sum of the numbers within it. We need to find the number located at the intersection of the row with the highest liveliness and the column with the lowest liveliness. If there are multiple such intersections, choose the one that is higher up in the table, and among those, the one further to the left. This will maximize the probability of passing the test.
Input
The first line contains the integer N (1 ≤ N ≤ 100). The following N lines contain the table, with each number being a natural number not exceeding 100000.
Output
Output a single number, which is the solution to the problem.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 941
Acceptance rate 43%