OI is Rui National DAY2: On thematic map

OI is Rui National DAY2: On thematic map

dfs / examples

Determining whether or not there is at least three points to simple paths between disjoint FIG.

One idea is the maximum flow (later said to do, but the practice is polynomial time

Next GavinZheng immortal talking about minimum spanning tree

Chen said that practice is the main dfs

In the first two points in two-point components in China Unicom

  1. By double ring is simple, only two, absent
  2. There is speculation that three other cases

Dual component resolution Unicom

Output of the tree can be judged dfs, discuss the non-tree edge coverage

  1. Contained within
  2. Below the bifurcation attached to the top
  3. intersect

Output points to

BFS / examples

BFS tree did not jump edge

Counting / dynamic programming it useful

Bfs sequence like a tree can judge the distance?

Right side is 0/1 deque BFS

Shortest

Sometimes you can use buckets instead of dijkstra heap (note range)

Example: codeforces 575 g of

Minimum spanning tree

  1. Minimum bottleneck road
  2. The second smallest Spanning Tree
  3. Spanning count / Matrix tree

Cut Point / Bridge

The cut point by double circle adjacent relationship forming side tree

Double bridge formation side edge Shuangshugou

Example: codeforces700C

All bridge request to the S T of a path: 1 answers

The answer is 2: enumerate each side of the path, find all the bridges

Other knowledge

  1. Euler
  2. 2-SAT

Do network flow problem

Miscellaneous questions

  1. AGC 038D (+ Analysis of the communication block configured to bridge)

  2. 2016 meter garlic road map of Baidu real-time traffic (the shortcomings shortest)

  3. sums GYM100753M

    Get modulus, built \ (\ min (a) * n \) edges calculated shortest scheme

    Can optimize, optimize the right side into 0-1

    bitset Acceleration: obtaining fast bit <10 ^ 5> a [10 ^ 5]

  4. Transitive Closure bitset +

Chen also said that the main graph theory, network flows are generally ~

Guess you like

Origin www.cnblogs.com/lcyfrog/p/11617167.html