segment tree in this prob

Правка en1, от ..OvO.., 2020-07-05 21:01:45
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

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ..OvO.. 2020-07-05 21:01:45 479 Initial revision (published)