Given a matrix of n × m, and there's exactly one number required to be selected in each column.
What's more , there are at least two numbers in thesame row among these m selected numbers.
Now XrkArul want to make the minimum number of these m selected numbers to be maximized.
Can you help him solve this problem?
The first line contains two positive integers n and m. (2<n,m<=1000)
Next, n rows, with m positive integers per row , It is guaranteed that each integer not exceeding 1e9.
An integer , the maximized "minimum number of these m selected numbers" .
2 2 1 2 3 4
3 Note: Because there are at least two numbers in the same row,In this case there are only two ways to select: select 1 and 2 ,which minimum number is 1 .And select 3 and 4,which minimum number is 3. So the maximized "minimum number of selected numbers" is 3.