Positive Solutions: maximum partition
Report problem solving:
Ang consideration if already Imperial point $ X $ is the $ max $ a, and now requires the number of $ [l, r] $ satisfies $ a_x = max \ left \ {a_i \ right \}, i \ in [l , r] $, and $ a_l \ cdot a_r \ leq a_x $
Now enumeration $ $ L, $ R & lt found that there is a range of $, to $ a_r \ leq \ frac {a_x} {a_l} $, this can be used to maintain the array into tree Well $ QwQ $
So basically this can draw basic idea of the problem? First, find the maximum range of $ x $, respectively, to find the answer to $ x $ both sides, then crossed the statistical contribution of $ x $. $ L consider enumeration $, then for $ r $ Fenwick tree on the line directly engage the next, but found too many points if $ l $ is also not available, so consider a small enumeration of $ size $ side.
The complexity and heuristic merge complexity is the same, to $ O (nlogn) $, then add complexity Fenwick tree, the total complexity on two of the $ log $
$over$?