Given an integer sequence $$$a_1,a_2,\ldots,a_n$$$ of length $$$n$$$. For an interval $$$a_l,\ldots,a_r$$$ in this sequence, a Reduce operation divides the maximum value of the interval by $$$2$$$ (rounding down). If there are multiple maximum values, choose the one with the smallest index. There are $$$q$$$ queries. Given three integers $$$l,r,k$$$ each time, query the maximum value of the interval after performing $$$k$$$ Reduce operations on the $$$a_l,\ldots,a_r$$$ interval. The queries are independent of each other. That is to say, each time the query starts from the initially given sequence.
The two integers $$$n,q$$$ ($$$1\le n,q\le 10^5$$$) in the first line represent the sequence length and the number of queries.
The second line contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$0\le a_i\le 10^5$$$).
The next $$$q$$$ lines each have three integers $$$l,r,k$$$ ($$$1\le l\le r\le n,0\le k\le 10^9$$$), representing a query.
For each query, output an integer in one line, representing the maximum value of the interval since the operation started from the initial sequence.
3 22 0 22 3 01 3 0
2 2
6 69 5 0 3 6 71 4 73 3 2336 6 03 4 44 5 151 1 0
1 0 7 0 0 9
| Название |
|---|


