Description
.gif)
Input
.gif)
修正一下
l = (l_0 + x - 1) mod n + 1, r = (r_0 + x - 1) mod n + 1
Output
.gif)
Sample Input
6 31 2 3 2 1 2
1 5
3 6
1 5
Sample Output
12
1
Hint
.gif)
修正下:
n <= 40000, m <= 50000
.gif)
.gif)
修正一下
l = (l_0 + x - 1) mod n + 1, r = (r_0 + x - 1) mod n + 1
.gif)
.gif)
修正下:
n <= 40000, m <= 50000