#P4251. [SCOI2015] 小凸玩矩阵

    ID: 3180 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 8 上传者: 标签>2015四川二分各省省选网络流二分图最大流

[SCOI2015] 小凸玩矩阵

Description

Xiao Tu and Xiao Fang are good friends. Xiao Fang gave Xiao Tu an n×mn \times m (nmn \leq m) matrix AA, and asks Xiao Tu to choose nn 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 kk-th largest number among the nn chosen numbers.

Input Format

The first line contains 3 integers nn, mm, kk.

Then follow nn lines, each containing mm numbers. In the ii-th line, the jj-th number denotes the element Ai,jA_{i,j} at row ii and column jj of the matrix.

Output Format

Output one line: the minimum possible value of the kk-th largest number among the nn 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 2020% of the testdata, 1nm91 \leq n \leq m \leq 9.

For 4040% of the testdata, 1nm221 \leq n \leq m \leq 22, 1n121 \leq n \leq 12.

For 100100% of the testdata, 1knm2501 \leq k \leq n \leq m \leq 250, 1Ai,j1091 \leq A_{i,j} \leq 10^9.

Translated by ChatGPT 5