#689. L3-3 A+B Problem
L3-3 A+B Problem
当前没有测试数据。
Description
定义:$a\oplus b=2\max\{a,b\},\ a\oplus b\oplus c=(a\oplus b)\oplus c$。
:。
:求 。
保证操作过程中 。
Format
Input
第一行两个个整数 。
第二行 个整数表示初始序列 。
接下来 行每个描述一个操作。
:。
:求 $a_l\oplus a_{l+1}\oplus ...\oplus a_r\ (1\leq l\leq r\leq n)$。
答案对 取模。
注意:是最终结果对 取模,不是计算过程中对 取模。
Output
对于每个操作 输出一行一个整数。
Samples
4 6
1 2 3 8
2 1 4
1 2 -1
2 1 3
1 1 -2
1 2 -3
2 1 2
16
6
998244351
相关
在下列比赛中: