7.22 Summary of the first session of Hangzhou Electric Multi-school (1/13)

Overview

topic practice status
Blank ?
Operation ?
Milk ?
Vacation Two points √+
Path Maximum flow
Typewriter ?
Meteor ?
Desert ?
String ?
Kingdom ?
Function ?
Sequence ?
Code ?
  • Representative post-match supplement
  • √+ I passed on behalf of the game
  • √- It means I didn’t do it
  • √-○It means I didn’t do it in the match, so I made up

04 - Vacation

As a preliminary question, it is really a pity that it will only appear after four hours.

Give the position/length/speed of many cars, all drive towards 0, and find the time when the head of the last car reaches 0 coordinates. Overtaking is not allowed. Too fast can only fight behind the previous car and move at the same speed as the previous car.

Dichotomous enumeration time, check the position of each vehicle from front to back, this is not difficult to calculate, passing 0 and not passing 0 are proportional to the time.

05 - Path

As the largest flow template question, because I am not sure if the complexity can be passed, I have been holding back and dare not do it.

This question is to give a graph with edge weights, and ask for the minimum cost of deleting some edges so that the original shortest path becomes longer (or simply disconnected).

In fact, it is to find the minimum cut of the shortest path generation graph.

What you need to know now is that although Dinic’s complexity was last in O (V 2 E) O(V^2E)O ( V2 E)But for many special graphs there will be faster performance.

For example, the edges are smaller, or closer to the bipartite graph. There is a bit of metaphysics.

Guess you like

Origin blog.csdn.net/Tighway/article/details/97102474