csp-s Analog 97

T1:
  playing table? ? ?
  (In fact Shoumo ......)
 
T2:
  design condition \ (f_ {i, c, 0/1} \) represents the i-th bit into consideration, the c have the same, whether or not previously have three consecutive , the number of program
  transfer is clear, but the matrix can quickly optimize power, then the complexity of the optimization is O (6 ^ 3logn)

  Another idea:
  Consider three successive one and only one, then we can calculate the length of three consecutive number i is not present embodiment \ (G_i \)
  Transfer: \ (G_i = (. 1-S) (G_ {i-1} + g_ {
i-2}) \)   Finally the answer is: \ (\ _ {I SUM = 0} ^ {}. 3-n-Ni-g_ig_. 3} {(\ S-FRAC. 1} { {s}) ^ 2s \)
  this recursion is g can quickly optimize power matrix, but in the end does not seem good ans optimization ()?
 
T3:
  Correct answer is plus scanning line segment tree cover set (a good trouble ah)
  However, we can find out by analyzing the problem of people not very malignant tumor, so it should not be weird card some algorithms (???)
  so we can use the kd-tree! (Well written ah)
  Although the time and space complexity can be stuck to the right, but the water too!

Guess you like

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