#P7477. [2017年杭电多校]Yuno And Claris
[2017年杭电多校]Yuno And Claris
Yuno And Claris
Problem Description
Yuno failed in a contest, so she was forced to wear JK dress. Claris AKed in a contest, so she bought some JK dresses for Yuno to wear, each dress has a price. Because Claris has lots of money, she bought dresses, and put them in an array . Because Yuno loves data structure, she invented kinds of operations : : Change all the dresses in with price to price . : Yuno wants to wear the -th cheapest dress in , please tell her the price of it.
Input
The first line of the input contains an integer , denoting the number of test cases. In each test case, there are integers in the first line, denoting the number of dresses and the number of operations. In the next line, there are integers , denoting the price of each dress. In the following lines, each line describes an operation. If it is a modification, then it is in the format of '''', where and . If it is a query, then it is in the format of '''', where and .
Output
For each query, print a single line with an integer, denoting the answer.
Sample Input
1
3 3
2 3 3
2 1 3 1
1 1 3 3 1
2 1 3 2
Sample Output
2
1
Source
2017 Multi-University Training Contest - Team 4