CSP-S [2019.09.15] A simulation group are summarized

Today's game to do it tired ah. . .

Venue: \ (50 + 30 + 0 = 80 \)


T1:
First, think of the most simple way: violence spfa, however, found to TLE, so would like to change dij, but still super time.
So start thinking positive solution, but it seems to think (I too dishes)
after the game found turned out to be greedy.
For binary we start from high to low to determine whether just the answer.
Since this contribution is greater than all of the back and so we can be added directly to the answer.
Then the rest of the illegal side deleted, with the remaining legal side to continue to do.
Available disjoint-set determination, bfs can be.


T2:


T3:


Summary:
To think more, think wider, not limited to that.

Now: \ (= 100 + 40 + 140 0 \)

Guess you like

Origin www.cnblogs.com/jz929/p/11530365.html