Qing North School dp graph theory Camp Travel day5

ysq Speaker:

tarjan reduced topological point + + Dij shortest.

floyd。。。。。

Single source. . The longest road. . .

Built pros and cons of both figures.

Half of the answer, the answer is greater than the new edge is added to the figure, if you can walk to the end, you can.

Or: adding descending edge (maximum spanning tree), it can be added until the first communication is terminated.

Or: run dij, to reduce the operating point to take min.

prim:

Code:

Correctness:

 

kruskal:

Matroid:

 

 

 

Matroid to prove correctness.

 

Tree multiplier multiplying sequences and seeking lca:

Chain tree split: son heavy and light side, both sides need to DFS, the first son of a weight determination, the second split the tree chains.

Chain split tree lca:

Tree chain split:

scc:

Well, so much. . .

Today, just challenge the chain tree tree line 260 + line, the autistic. . . . .

Good finishing it. . .

I'm good food ah

Guess you like

Origin www.cnblogs.com/lbssxz/p/11332490.html