P15941 [HackerEarth] After figuring out what was that something that was bothering him, something more started bothering Micro. See, Micro's a kind of guy, who always has something bothering him. This time h
普及-
题目描述

After figuring out what was that something that was bothering him, something more started bothering Micro. See, Micro's a kind of guy, who always has something bothering him. This time his friend Chacha will help him find out if he passes the "Test". Chacha gave him an array A having N integers. Now Chacha will ask Q queries. Each query will be of one of the following types:

0 x val: Set A[x] = val
1 val: Find position of first element in the array that is greater than or equal to val.

Assume 1-based indexing of the array.Help Micro perform the queries.

Input:
First line of input consists of two space separated integers denoting N and Q.
Second line consists of N space separated integers denoting the array A.
Following Q lines consists of query as described in the statement.

Output:
For each query of type 1 print the answer in a new line.

Constraints:
1 ≤ N, Q, x ≤ 10^5
1 ≤ A[i], val ≤ 10^9

SAMPLE INPUT
5 4
5 4 3 2 1
1 4
1 6
0 3 7
1 6

SAMPLE OUTPUT
1
-1
3

输入格式

见题面

输出格式

见题面

样例输入
100 100 32826 65734 24342 79246 48514 51314 4277 77478 45395 54995 18927 76638 30023 82600 1587 15490 47170 53770 53120 82393 4707 87447 53513 52532 61480 37414 29481 5756 32059 14148 26771 64884 96234 67465 44129 44747 35130 64757 22224 80524 36103 57502 73514 66125 40101 75100 81615 3623 45222 51086 86015 66280 38532 55880 18811 16363 93293 64644 38470 25351 78791 65241 6586 75024 32705 50715 19771 67834 31823 58346 64710 67926 32200 38223 50402 72300 29674 48368 92274 91247 99453 78289 57526 54336 50520 92689 70698 43812 73684 9168 85514 52474 90760 92099 43850 39816 99964 99971 99900 99987 0 10 75265 1 99454 1 96235 1 99454 0 8 89838 0 86 99925 0 26 47575 1 96235 1 96235 1 99926 1 99454 0 79 99930 1 99931 1 96235 0 23 49082 0 90 99917 0 9 14379 1 96235 1 96235 1 99931 1 99931 0 67 99933 1 99934 1 96235 0 28 54090 0 6 20272 0 100 99925 1 99934 1 99934 1 99965 0 83 99988 1 99989 1 96235 1 96235 0 92 99931 0 10 65317 0 51 99916 1 99934 1 99989 1 99989 1 99934 0 87 99990 1 99917 1 99989 0 38 38372 0 19 61221 0 30 58023 1 99991 1 99934 1 99917 1 99991 0 51 99919 1 99934 1 99920 0 61 99994 0 99 99936 0 11 42110 1 99920 1 99995 1 99995 0 24 77217 0 24 77798 0 74 99927 1 99920 1 99920 1 99995 0 76 99943 1 99995 1 99995 1 99920 1 99920 0 84 99969 0 94 99974 0 92 99902 0 61 99999 1 99920 1 99920 1 100000 1 99920 1 100000 0 64 99925 0 99 99952 0 100 99940 1 100000 1 100000 1 100000 0 75 99993 1 100000 1 100000 1 100000 0 27 74147 1 100000 0 33 673 1 89839 0 37 28126 0 87 99929 1 100000 1 100000 1 100000 1 100000
样例输出
97 81 97 81 81 97 86 97 79 79 79 97 97 97 67 97 97 98 -1 67 67 83 -1 -1 83 67 87 -1 83 67 -1 83 67 61 -1 -1 61 61 -1 -1 -1 61 61 61 61 -1 61 -1 -1 -1 -1 -1 -1 -1 -1 51 -1 -1 -1 -1