| 2025 USACO.Guide Informatics Tournament |
|---|
| Закончено |
You are given a strictly increasing array $$$a$$$ of length $$$n$$$ ($$$a_1 \lt a_2 \lt \ldots \lt a_n$$$).
Determine whether it is possible to insert $$$k$$$ integers $$$b_1 \le b_2 \le \ldots \le b_k$$$ arbitrarily into $$$a$$$, such that $$$b_1 \ge a_1$$$, $$$b_k \le a_n$$$, and $$$a$$$ is strictly increasing after all $$$k$$$ integers have been inserted.
Since this problem is too easy, solve the problem for $$$q$$$ point updates on $$$a$$$.
Each test contains multiple test cases. The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows.
The first line of each test case contains three integers $$$n$$$, $$$k$$$, and $$$q$$$ ($$$1 \le n \le 2\cdot 10^5, 0 \le k \le 10^9$$$, $$$1 \le q \le 2\cdot 10^5$$$) — the length of $$$a$$$, the number of integers to insert into $$$a$$$, and the number of point updates, respectively.
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots a_n$$$ ($$$1 \le a_i \le 10^9$$$) — the strictly increasing array $$$a$$$ itself.
Each of the next $$$q$$$ lines of each test case contains two integers $$$i$$$ and $$$x$$$ ($$$1 \le i \le n, 1 \le x \le 10^9$$$) — representing a point update to set $$$a_i:=x$$$.
It is guaranteed that the sum of $$$n$$$ and the sum of $$$q$$$ over all test cases both do not exceed $$$2\cdot 10^5$$$.
Output $$$q$$$ lines, with the $$$q_i$$$-th line being "YES" if it is possible to insert $$$k$$$ integers into $$$a$$$ after the $$$i$$$-th point update, or being "NO" if it is impossible. You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.
24 2 41 2 4 54 62 34 91 310 1 41 2 3 4 5 6 7 8 9 101 19 1110 1110 12
YES YES YES NO NO NO NO YES
| Название |
|---|


