当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6337:Problem F. Travel Through Time

题目描述
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.
输入解释
The first line of the input contains an integer $T$ denoting the number of test cases.
Each test case starts with an integer $q$ $(1 \le q \le 50000, \sum{q} \le 10 ^ 6)$ denoting the number of events.
Each of next $q$ lines contains an encrypted event, remember to decrypt it first!
* $0 \le x \le 10 ^ 6$ for type-2 events
* $|x| \le 10 ^ {12}$ for type-1, type-5 events
* $|l|, |r| \le 10 ^ {12}, l \le r$ for type-3 events
* It is guaranteed that $x$ is less than the current number of events for type-4 events.
输出解释
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
输出样例
No
Yes
No
Yes
Yes
来自杭电HDUOJ的附加信息
Recommend chendu

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6337

最后修改于 2020-10-25T23:30:24+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000/5000MS(Java/Others) 262144/262144K(Java/Others)