2112: 找第 K 小的数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:239 Solved:20

Description

Input

Output

共输出 M 行,第 i 行输出第 i 个询问的答案。

Sample Input Copy

4 3
4 1 2 3
1 3 1
2 4 3
1 4 4

Sample Output Copy

1
3
4

HINT

Source/Category