UOJ Logo 黑暗爆炸OJ

DARKBZOJ

#2724. [Violet 6]蒲公英

统计 下载数据

Description

Input

修正一下

l = (l_0 + x - 1) mod n + 1, r = (r_0 + x - 1) mod n + 1

Output

Sample Input

6 3
1 2 3 2 1 2
1 5
3 6
1 5

Sample Output

1
2
1

Hint


修正下:


n <= 40000, m <= 50000

Source

Vani原创