22151_SortNumbers

2022-5-16 18:21| 发布者: Hocassian| 查看: 31| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506153573600-Problem List-采集的数据-后羿采集器.html

Pro.ID

22151

Title

Sort Numbers

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22151

AC

1

Submit

10

Ratio

10.00%

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    Given two sequences A = ( a1, a2, a3, ..., an ) and B = ( b1, b2, b3, ..., bm ), multiply ai ( 1 ≤ in ) by bj ( 1 ≤ jm ), 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 ≤ km×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 ≤ in ) by bj ( 1 ≤ jm ), 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 ≤ km×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
    1
    3 2 1

    3 3 7
    1 2 3
    1 2 3

    Sample Output

    3
    6

    Source

    样例输入

    1 3 3
    1
    3 2 1

    3 3 7
    1 2 3
    1 2 3

    样例输出

    3
    6

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部