Simulation 80 (a)

In fact, next door to the set of problems more difficult than this. . . . One would not. .

T1

  The title has been given recurrence formula, then this problem did not have anything, direct matrix multiplication would be finished.

  However, did not see on the test matrix, mainly used crt invention for a long time, I know the principle, but not hit. . . . Finally tried, tried out.

  Unfortunately, this problem did not give $ O (n) $ set points.

T2

  AC automaton dp, quite naked.

T3

  $ $ Tarjan run on residual network.

  First run again network flow, the residual network built out, then an edge is possible, if and when it is into the matching edge or two points connected to it in the same scc, then run again gone $ $ Tarjan .

  Consider why it is, for the remaining amount of the network of an edge, if this edge is possible, then flip it, if the two end points of the same intensity Unicom components, then there must be a scheme that the strong link component some while maintaining connectivity through the flip, so it is feasible, whereas the same reason.

 

Guess you like

Origin www.cnblogs.com/hzoi-cbx/p/11709985.html
80