T565373 「TFXOI R1」Atop the Mountain Range
Background
> I wish to stand atop the mountain range, gazing at the starry Milky Way above and the kaleidoscopic world below.
Description
This is an **interactive problem**.
The "God" is touring his created "world". He sees a mountain range of length $n$ with **strictly increasing** peaks (i.e., $n$ mountains with **strictly ascending** heights), where the heights are $a_1 \sim a_n$. The "God" wants to climb the highest peak to enjoy the view. You need to tell him the position of the highest peak. However, he thinks this is too easy for you, so he will perform $m$ modifications. Each modification will raise or lower the heights of mountains in interval $[l, r]$ by some value. After each modification, you must report the position of the highest peak (any position is acceptable if multiple peaks share the maximum height).
Of course, you might not have the divine power to know every mountain's height. Thus, after each modification, you can ask the "God" up to $k$ times about the relative heights of two mountains $x$ and $y$. If the answer is `0`, it means $a_x < a_y$; if the answer is `1`, it means $a_x \ge a_y$.
Input Format
N/A
Output Format
N/A
Explanation/Hint
### Sample Explanation
Initial mountain heights: $\{1, 2, 3, 4, 5\}$.
First modification: add $1$ to interval $[1, 2]$, resulting in $\{2, 3, 3, 4, 5\}$.
Second modification: add $2$ to interval $[2, 4]$, resulting in $\{2, 5, 5, 6, 5\}$.
Third modification: add $3$ to interval $[1, 2]$, resulting in $\{5, 8, 5, 6, 5\}$.
### Constraints
- **Bundled testing is used for this problem**.
- For all data: $1 \le n \le 10^5$, $1 \le m \le 10^4$, $34 \le k \le 10^5$, $1 \le l \le r \le n$, $\forall i \in [1, n), 1 \le a_i < a_{i+1} \le 10^9$. Additionally, your queries $x, y$ must satisfy $1 \le x, y \le n$. Detailed constraints are shown below.
| Subtask ID | $n$ | $m$ | $k$ | Points |
|:-:|:-:|:-:|:-:|:-:|
| #1 | $\le 10$ | $\le 10$ | $\ge 10^5$ | 5 pts |
| #2 | | $\le 10$ | $\ge 100$ | 35 pts |
| #3 | | | | 60 pts |
**Ps: The time complexity for each SPJ response is $O(\log n)$.**
Please ensure buffer flushing. You can use the following commands:
- For C/C++: `fflush(stdout);`
- For C++: `std::cout