4 special math test

A. finger-guessing game

  Very algorithm called pseudo examination room, I do not know why 50 could get.

  The key questions that the whole than a two winning percentage of people determined. Standard practice is to process scores planning.

  Consider dichotomous answer, set half the value val, then A will win a contribution as -val, B wins a contribution of 1, you can get over backwards dp whether a solution exists.

  So get after winning the ratio, consider how to get the final answer. Order $ a_i $ denotes been won i winning when wheel, clearly $ a_ {i} = a_ {i-1} * p + a_ {i + 1} * q $, p, q represents two separate winning.

  Thus direct Gaussian elimination on it.

  However, the solution to the problem of the higher-end $ O (1) $ calculation formula, and can not understand what it meant.

B. inequ

  gugugu

C. Spanning Tree

  Matrix is ​​not difficult to think of a tree, then?

  To the right side edge of each color may wish to set up the right side, for convenience, it is assumed for the red edge of the right side 1, provided the other two sides are respectively x, y, then in this case we find out matrix tree Theorem All values ​​spanning the right and to $ \ sum num_ {i, j} x ^ {i} y ^ {j} $, where num is selected from the two kinds of edge i, j is the number of bar scheme.

  I found that this thing is multivariate equations, so long tape into a plurality of groups x, y and Gaussian elimination on it.

  If a two-dimensional interpolation is $ O (n ^ 5) $, Gaussian elimination $ O (n ^ 6) $ constant is small, however, it is possible too.

Guess you like

Origin www.cnblogs.com/hzoi-cbx/p/12241539.html