#P4251. [SCOI2015] 小凸玩矩阵
[SCOI2015] 小凸玩矩阵
Description
Xiao Tu and Xiao Fang are good friends. Xiao Fang gave Xiao Tu an () matrix , and asks Xiao Tu to choose numbers from the matrix such that no two chosen numbers are in the same row or the same column. Now Xiao Tu wants to know the minimum possible value of the -th largest number among the chosen numbers.
Input Format
The first line contains 3 integers , , .
Then follow lines, each containing numbers. In the -th line, the -th number denotes the element at row and column of the matrix.
Output Format
Output one line: the minimum possible value of the -th largest number among the chosen numbers.
2 3 1
1 2 4
2 4 1
1
3 4 2
1 5 6 6
8 3 4 3
6 8 6 3
3
Hint
For % of the testdata, .
For % of the testdata, , .
For % of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号