~/algor $ cat problems/matrix/smallest-of-the-row-maximums
Smallest of the row maximums
Easy
1000 ms
128 MB
26%
An integer matrix of size is given. Among the largest elements of the rows, find the smallest one:
Input
The first line contains two positive integers and . Each of the next lines contains integers.
Output
One integer — the smallest of the row maximums.
Note
Examples
Input #1
3 3 1 7 3 4 2 5 9 8 6
Output #1
5
Input #2
1 3 -1 -2 -3
Output #2
-1