csp-s Analog 52

T1:
binary answer
\ ((sum_r-sum_l) / (rl is an) <= MID \)
\ ((sum_r-MID * R & lt) - (sum_l-MID * L) <= 0 \)
made real number of good statistics, may then be after CDQ partition or sort by weight relatively id

T2:
first preprocessed G [i] [j] denotes the i-th position of the j-coating color, the number of programs to be used by each color
\ (g [i] [j ] = (g [i-1] [j- 1] * (color_ {tot}
- (i-1)) + g [i] [j-1] * i) \) and then enumerate the number of colors and the two public numbers of colors are dp
then use the matrix fast optimization of power on the line

T3:
First, to answer the very beginning of treatment with the Chairman of the tree
then put all sort of inquiry in accordance with the insertion of a new President of the x tree, modify the query each time a change to the answer to
find the need to modify the support zone and single query, you can either differential or mark perpetuate

Guess you like

Origin www.cnblogs.com/Gkeng/p/11791151.html