Luo Gu $ P4068 \ [SDOI2016] $ paired digital network flow

Positive Solutions: Network Flow

Report problem solving:

Portal $ QwQ $

Obviously the pretreatment can be connected to an edge between which $ A $, then consider building two rows of points, even the flow rate of $ c_ {i} \ cdot c_ {j} $, $ ST and INF $ $ $ connected, a running cost flow ?

Now and then we ran into two issues $ QwQ $

The first to say can not be reused?

Children may be considered, if it is $ (i, j) $ a viable point, it should even $ (i, {j} '), (j, {i}') $, obviously not only run a thing, then it is the final answer by 2 to $ QwQ $

The second said, ask at the expense of not less than maximum flow under the premise of zero ,,, it is simple and unpretentious previous questions are not the same ,,,

Consider greedy, first said the biggest cost to negate chant.

Then on the next judge, if augmented before the augmented current cost + cost> 0 then counted out before taking each augmented when the maximum flow on into $ QwQ $

Each time the correctness of that are the shortest run? So it is very clearly not to say $ QwQ $

$over$

Guess you like

Origin www.cnblogs.com/lqsukida/p/11305926.html