Problem F. Problem F. Travel Through Time
时间限制 5000 ms
内存限制 256 MB
Kazari, a girl who can travel through time, is playing chess on a number axis.
At the very beginning, there is a chess at position $0$.
Then $q$ events occurs in sequence, each of which belongs to one of the following five types:
* 1 x She places a chess at position $x$.
* 2 x She places a chess at position $z$ if there exists chess at position $y$ where $|y - z| \le x$.
* 3 l r She reverses $[l, r]$, i.e., each chess at position $x$ $(l \le x \le r)$ moves to position $r + l - x$.
* 4 x She travels to the time right after the $x$-th event.
* 5 x She checks if there exists chess at position $x$.
During the game, Kazari will tell you the $q$ events in sequence. You are curious about the checking results of type-5 events, and decide to work out it timely according to the given information.
In order to keep your algorithm online, the input has been encrypted. You should `XOR` the current number of
type-5 events whose result is `Yes` to each $l, r$ and $x$, to get the real input.
输入数据
输出数据
For each test case, print `Yes` or `No` for each type-5 event.
样例输入
复制
1
9
2 5
5 6
3 1 10
5 6
1 0
5 2
5 0
4 0
5 7
样例输出
$ Mathjax font initiator $