I need solution of this problem

Revision en1, by Oanh_va_Khoi, 2025-02-16 13:41:36

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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Oanh_va_Khoi 2025-02-16 13:41:36 391 Initial revision (published)