#P5397. [Ynoi2018] 天降之物
[Ynoi2018] 天降之物
Description
Icarus gives you a sequence of length .
You need to process operations. There are two types of operations:
- Change the value of every element equal to in the sequence to .
- Find a position such that and a position such that , so that is minimized, and output .
Input Format
The first line contains two integers .
The next line contains integers, representing the sequence .
Then follow lines, each containing three numbers .
If is , it means changing the value at every position with value to .
If is , it means finding a position such that and a position such that to minimize , and output . If no such positions can be found, output Ikaros.
This problem is strictly online. For each operation, need to be xor-ed with the answer from two queries ago. If the output is Ikaros, or if it is the first query, then the last answer is .
There are test cases in total, and it is guaranteed that .
Output Format
For each operation of type , output one line with an integer representing the answer.
If it is impossible to find that satisfy the statement, output Ikaros.
5 5
1 2 2 4 4
2 3 3
2 2 4
1 3 2
1 5 5
2 2 5
Ikaros
1
1
Hint
Idea: nzhtl1477, Solution: nzhtl1477, Code: nzhtl1477, Data: nzhtl1477 ( partially uploaded ).
Constraints: For of the testdata, all numbers are within , and the value in each operation does not exceed .
Translated by ChatGPT 5
京公网安备 11011102002149号