Subtract if Greater!

아직 제출이 없습니다시간 제한5초메모리 제한512 MB

문제

Consider a multiset AA consisting of nn elements: a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n.

Let us define two types of operations which can be performed on this multiset:

  1. Given x_ix\_i, you have to print the number which will be x_ix\_i-th element if we sort the multiset in non-decreasing order.
  2. Given x_ix\_i, you have to subtract x_ix\_i from all the elements of AA which are strictly greater than x_ix\_i.

Your task is to perform qq given operations in the given order and output the results of all operations of the first type.

입력

The first line contains two integers nn and qq: the size of the multiset AA and the number of queries (1n1051 \le n \le 10^5, 1q1061 \le q \le 10^6).

The second line contains nn integers a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n (1a_i1091 \le a\_i \le 10^9): the elements of AA.

Each of the next qq lines describes a single operation. An operation is given as two integers t_it\_i and x_ix\_i: the type and the parameter of the operation. It is guaranteed that t_i1,2t\_i \in \\{1, 2\\}. If t_i=1t\_i = 1, then 1x_in1 \le x\_i \le n. If t_i=2t\_i = 2, then 1x_i1091 \le x\_i \le 10^9.

It is guaranteed that there is at least one operation of type 11.

Please note that elements of AA are given in arbitrary order.

출력

For each operation of the first type, output the x_ix\_i-th element in non-decreasing order. Separate the answers with line breaks.