Can somebody tell me how to solve
these kind of problem using SEGMENT TREE
problem statement:
calculate the maximum sum of the element of the sequence such that
the elements are in strictly decreasing order and first and last points
of the sequence are in it and the first point is always greater
than any other points in the sequence .
ex: if the sequence it [30,27,24,15,17,10,12]
the answer will be 30+27+24+17+12
and you thought just by writing a blog on codeforces you can get solution for this ongoing contest problem.
sharam kro bhai sharam kro