test20191001

Cackle

Today's test \ (T1 \) Modulus written \ (98,344,353 \) can be okay. . .
Today's topic is still feeling very can do, but people say Topic \ (T3 \) than \ (T2 \) simple I really served. .

\ (T1 \)

Consider pushing equation.
First write \ (F_n \) Calculation formula: \ (F_n = f_0 \ CDOT F_n F_1 + \. 1-n-CDOT F_ {+} \ + cdots F_n \ CDOT f_0 \) .
We consider \ (F_n \) whether the \ (F_ {n-1} \) transfer over.
We \ (F_n \) and \ (F_ {n-1} \) calculating the difference can be obtained by the following equation: \ (F_n-F_ {} =. 1-n-f_0 \ CDOT F_ {n-2} +-F_1 \ CDOT F_ {}. 3-n-+ \ cdots-n-2 + F_ {} \ + CDOT f_0 F_n \ CDOT f_0 \) .
Found that apart behind \ (f_n \ cdot f_0 \) outside, is \ (F_ {n-2} \) formulas, it is possible to obtain \ (F_n \) recursive formula: \ (= F_ {n-F_n n-F_ {+} -1-F_n 2} + \) .
So we quickly power can be directly on the matrix.

\ (T2 \)

Consider a rooted tree approach.
Each can be found in all non-leaf nodes, we all need to do more on its side is covered even a son to the selected edge node number, the last and then subtract the number of covering all sides of the number of times we have chosen to cover the side of the can .
Because it is a tree without roots, we need to consider changing root.
We can see, each time changing the root, it will only affect a child node to the root and steering, direct violence can be recalculated.

Guess you like

Origin www.cnblogs.com/TheShadow/p/11615547.html