![]() |
||||||||||
|
||||||||||
MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1 Accepted Submission(s): 1 Problem Description You are given a matrix which is n rows m columns (1 <= n <= m <= 100). You are supposed to choose n elements, there is no more than 1 element in the same row and no more than 1 element in the same column. What is the minimum value of the K_th largest in the n elements you have chosen. Input First line is an integer T (T ≤ 15), the number of test cases. At the beginning of each case is three integers n, m, K, 1 <= K <= n <= m <= 100. Then n lines are given. Each line contains m integers, indicating the matrix. All the elements of the matrix is in the range [1, 109]. Output For each case, output Case #k: one line first, where k means the case number count from 1. Then output the answer. Sample Input
Sample Output
Source | ||||||||||
|