Minimum among maximums
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
You are given a two-dimensional array of size . Find the maximum element in each line, and find the minimum among the maximum elements.
Input
The first line contains two integers and — the number of rows and columns. Then lines of integers are given — the elements of array.
All numbers do not exceed by absolute value.
Output
Print one number — the answer to the problem.
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 52%