Problem 28475 --线段树

28475: 线段树

Time Limit: 2 Sec  Memory Limit: 512 MB
Submit: 1  Solved: 1
[Submit][Status][Web Board][Creator:][下载FPS0元][添加到购物车][下载测试数据0元][54510kb]

Description

Input

Output

Sample Input

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

Sample Output

7
11
3

HINT

Source

[Submit][Status]