NOIP autistic Race 2

  • T1

  • The rows and columns as a point to point as each row and column where even the edges, then the robot to pick up the gold essence is to walk in the new bipartite graph, since each side can only go through once (coins only to pick up once) and each edge to be traversed (all coins to be picked up), it is determined whether there is a path to Euler

  • T2

  • orz sick

  • The priority_queue a whole, according to the title number is less than intended to reload the simulation, and then added to the list one by one like, suctask3 attention long enough a longitudinal push 100 (using the monotonicity), then there 70pts

  • T3
  • orzqy
  • Consider only k = 2, push the two equations

    $ E (a_n ^ 2) $

    $= \frac{\sum_{i=0}^{n-1} \sum_{r=0}^{n-1}E((a_i+a_r)^2)}{n^2} $

    \(=\frac{2\sum_{i=0}^{n-1}E(a_i^2)}{n}+\frac{2\sum_{i=0}^{n-1}\sum_{r=0}^{n-1}E(a_ia_r)}{n^2}\)

    \ (\ Sum_ {i = 0} ^ n \ sum_ {r = 0} 'He (a_ia_r) \)

    \ (= \ Sum_ {i = 0} ^ {n-1} \ sum_ {r = 0} ^ {n-1} E (a_ia_r) +2 \ sum_ {i = 0} ^ {n-1} E ( a_ia_n) + E (a_n ^ 2) \)

    \(=\sum_{i=0}^{n-1}\sum_{r=0}^{n-1}E(a_ia_r) +2\sum_{i=0}^{n-1}E(a_i\frac{2\sum_{i=0}^{n-1}a_i}{n}+E(a_n^2))\)

    \(=\sum_{i=0}^{n-1}\sum_{r=0}^{n-1}E(a_ia_r) +\frac{4E(\sum_{i=0}^{n-1}\sum_{r=0}^{n-1}a_ia_r)}{n}+E(a_n^2)\)

    \(=\frac{n+4}{n}E(\sum_{i=0}^{n-1}\sum_{r=0}^{n-1}a_ia_r)+E(a_n^2)\)

  • 设$ dp1_n E = (a_n ^ 2) $ \ (dp2_n = \ sum_ {i = 0} ^ n \ sum_ {r = 0} 'He (a_ia_r) \)

  • \(dp1_n=\frac{2\sum_{i=0}^{n-1}dp1_i}{n}+\frac{2dp2_{n-1}}{n^2}\) \(dp2_n=\frac{n+4}{n}dp2_{n-1}+dp1_n\)

    Then recursive 80pts

Guess you like

Origin www.cnblogs.com/stepsys/p/11619233.html