csp-s Analog 91

T1:
  analysis, since \ (1 + 2 + 3 + ... + x = (1 + x) * x / 2 \) is \ (x ^ 2 \) level
  so that when the total number of cards is n, then number of types deck level number is \ (\ sqrt {n} \ ) , so violent like ......
 
T2:
  consider a dp of each location
  if the position of the currently considered as p, considering the influence of the number of the last its position and only the number equal to the number of
  the simulated process merged, one may wish to consider when a merge, the left p
 
  set \ (G_i \) represents the probability of the i-th row of a layer of p bits, \ (g'_i \) represents the probability that a layer of p in the i-th row position
  and then a pre-array \ (f_ {i, j} \) represents about two pointers pointing to merge when i-th bit and the j-th bit of the probability
 
  that g ' the transfer is: \ (G '{_} + I + J * G_i = F_ {I, J}. 1 + / 2 \) found the WA ......
 
  considered where the wrong conditions found when all the right number of selected , the probability of not \ (f_ {i, j +
1} / 2 \)   as \ (f_ {i, j + 1} \) is to ensure that the right pointer j + 1 is not stopped in the upward, but in practice the right pointer has Saowan, do not need to promise not to jump on
  In this case the probability becomes $ \ sum_ {k = 1} ^ i f_ {k, j} / 2 $ ( this also requires preprocessing)
  that is: j i enumeration stopped when swept to the
 
  position in the final answer needs to be added is less than \ (a_p \) of the number of the number of

Guess you like

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