Hello Codeforces — ers,
I have this problem need to solve
Given an array a with N integers (1 <= N <= 500000)
Given Q queries (1 <= Q <= 100000), for each query, we have 2 integers L and R, we have to find the maximum value of a[x] + a[y] + a[z] with sastifies:
. L <= x < y < z <= R . y — x < z — y
Thanks a lot :D