#P5356. [Ynoi Easy Round 2017] 由乃打扑克
[Ynoi Easy Round 2017] 由乃打扑克
Background

Problem Description
Yuno is not very good at playing poker.
So she came up with a data structure problem.
You are given a sequence of length . You need to support operations of two types:
- Query the -th smallest value in the interval .
- Add to every element in the interval .
Input Format
One line with two integers .
The next line contains integers; the -th integer represents .
The next lines each contain four integers , where indicates which type of operation it is.
Output Format
For each query, output one number as the answer. If there is no solution, output .
1 1
1
1 1 1 1
1
Hint
Idea: nzhtl1477.
Solution: nzhtl1477 () solution, ccz181078 () solution.
Code: nzhtl1477 () code, ccz181078 () code.
Data: nzhtl1477.
Constraints: , , , .
: A new set of hack testdata has been added.
Translated by ChatGPT 5