Max query 1 queston

any hint to solve using segment tree !!!

use segment tree of vectors