eolymp
bolt
Try our new interface for solving problems
Problems

Minimum among maximums

Minimum among maximums

You are given a two-dimensional array of size $n \cdot m$. Find the maximum element in each line, and find the minimum among the maximum elements. \InputFile The first line contains two integers $n$ and $m$ --- the number of rows and columns. Then $n$ lines of $m$ integers are given --- the elements of array. All numbers do not exceed $100$ by absolute value. \OutputFile Print one number --- the answer to the problem. \includegraphics{https://static.eolymp.com/content/fk/fkhn2uuh4938d85s59nnhn4mr0.gif}
Time limit 1 second
Memory limit 128 MiB
Input example #1
4 5
1 5 3 2 4
2 4 3 2 2
6 7 8 9 5
8 9 4 2 5
Output example #1
4
Author Жуковський Сергій Станіславович
Source Джерело Серія задач "Абетка програмування"