Pro.ID22151 TitleSort Numbers Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22151 AC1 Submit10 Ratio10.00% 时间&空间限制描述Given two sequences A = ( a1, a2, a3, ..., an ) and B = ( b1, b2, b3, ..., bm ), multiply ai ( 1 ≤ i ≤ n ) by bj ( 1 ≤ j ≤ m ), a new sequence with m×n numbers is generated. Sort this sequence in non-descending order and find the number which is in the k-th position. 输入Input contains multiple test cases. The first line of each test case contains three integers: n ( 1 ≤ n ≤ 10000 ), m ( 1 ≤ m ≤ 10000 ), k ( 1 ≤ k ≤ m×n ). The second line contains n integers, representing the sequence A. The third line contains m integers, representing the sequence B. All the numbers of sequence A and B are in range [0, 10000]. There is a blank line after each test case. 输出Description Given two sequences A = ( a1, a2, a3, ..., an ) and B = ( b1, b2, b3, ..., bm ), multiply ai ( 1 ≤ i ≤ n ) by bj ( 1 ≤ j ≤ m ), a new sequence with m×n numbers is generated. Sort this sequence in non-descending order and find the number which is in the k-th position. Input Input contains multiple test cases. The first line of each test case contains three integers: n ( 1 ≤ n ≤ 10000 ), m ( 1 ≤ m ≤ 10000 ), k ( 1 ≤ k ≤ m×n ). The second line contains n integers, representing the sequence A. The third line contains m integers, representing the sequence B. All the numbers of sequence A and B are in range [0, 10000]. There is a blank line after each test case. Output Output the answer on a single line for each test case. Sample Input 1 3 3 Sample Output 3 Source 样例输入1 3 3 样例输出3 作者 |