| JCPC 2022 |
|---|
| Finished |
"From your blood I drink, Milk" said Omda.
We all know that good rappers drink milk every day.
Omda was trying to walk on the beat same as he does every day.
Initially, Omda is standing on point $$$0$$$ on the beat. Each moment he'd do one of three operations:
Badran was taking pics of Omda while he was doing this greatness. So he took $$$N$$$ pics the $$$i-th$$$ pic Omda was standing at point $$$A_i$$$.
Badran will ask you $$$Q$$$ questions, each question is in the form of $$$U_i$$$ and $$$V_i$$$ and goes like this, Are you sure that Omda went to point $$$U_i$$$ and then went to point $$$V_i$$$?
More formally, according to the above rules are there some two points in time $$$A \leq B$$$ were at $$$A$$$ Omda was standing at $$$U_i$$$ and at $$$B$$$ Omda was standing at $$$V_i$$$?
The first line contains the number of test cases $$$T$$$ $$$(1 \leq T \leq 10^5)$$$.
The first line of each test case contains two integers $$$N$$$ and $$$Q$$$ $$$(1 \leq N, Q \leq 10^5)$$$.
The second line of each test case contains $$$N$$$ space-separated integers $$$A_{1},A_{2},\dots,A_{N}$$$ $$$(0 \leq A_i \leq 10^9)$$$.
The following $$$Q$$$ lines of each test case contains two integers each $$$U_i, V_i$$$ $$$(0 \leq U_i, V_i \leq 10^9)$$$.
It is guaranteed that the sum of $$$N$$$ over all test cases does not exceed $$$10^5$$$.
It is guaranteed that the sum of $$$Q$$$ over all test cases does not exceed $$$10^5$$$.
For each query, print "Yes" (without quotes and case insensitive) if you're sure that Omda did go to $$$U_i$$$ at some point then to $$$V_i$$$ and "No" otherwise.
15 63 1 7 2 104 67 13 110 116 31 20
Yes No Yes No Yes No
For the first query, Omda did go all the way up to $$$7$$$ so he'd have had to pass by $$$4$$$ to go to $$$6$$$.
For the second query, Omda did go all the way up to $$$7$$$ then to $$$2$$$ but we're not sure about $$$1$$$.
For the third query, Omda did go to $$$3$$$ and then to $$$1$$$.
| Name |
|---|


