CSP-S analog (b)

Reached achievements:

              Life for the first time AK!

    

T1

 

 

  The optimal situation is to allow more people to take part in the battle, then left after the battle the more people the more gifted, you can sort by ba

 

 

 

T2

 

  You can cut off entirely due before cultural studies, learn better to do rowing when pushed through a very detailed

 

T3

 

  DPn ^ 2 pretreatment, g [l] [r] is the number of l ~ r palindromic sequence, sum [j] recorded rearwardly until the point i to point j palindromic sequence left end point

 

, F [l] [r] to l, the number of palindromic sequence between r, n will be apparent to the enumeration i, enumerated backwards j, f [j] [i] = f [j + 1] [ i] + sum [j] + g [j] [i]

 

, While g [j] [i] Update sum [j], the final O (1) Query

 

 

 

 

Guess you like

Origin www.cnblogs.com/heoitys/p/11616230.html