## 利普希茨序列

$2≤n≤10^5$
$1≤q≤100$
$0≤a_i≤10^8$
$1≤l < r≤n$

10 4
1 5 2 9 1 3 4 2 1 7
2 4
3 8
7 10
1 9
7 6
5 7 7 4 6 6 2
1 2
2 3
2 6
1 7
4 7
3 5

17
82
23
210

2
0
22
59
16
8

$L([5,2])=3$

$L([2,9])=7$

$L([5,2,9])=7$

math data structure

Weekly Training 2018.1.28