[Help] Modify Label in 316C2 Max Flow Min Cost

Правка en1, от Libraion, 2021-04-06 19:41:01

In problem 316C2, the solution is to find Max Flow Min Cost of the constructed graph.

Skimming through some fastest submissions, I noticed that there is a function called modify_label that replaced SPFA to find shortest path in normal MFMC. Here is one of those submisions.

And this modify_label only cost $$$O(|V| + |E|)$$$ complexity, result in small overall complexity. I think this has some relation with Johnson's algorithm.

Please someone explained it to me how this function works and how this is applicable with this problem. Thanks :<.

Теги mcmf, modify label

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Libraion 2021-04-06 19:41:01 710 Initial revision (published)