In the problem 704-D (http://codeforces.me/problemset/problem/704/D) from round #366 I have problems with understanding the solution. Could someone give a hint on a couple of moments?
1) How one can assign both upper and lower constraints on the flow? Upper constraints will obviously be set by capacities, but how to deal with the lower ones?
2) In published solution (https://gitlab.com/amirmd76/cf-round-366/blob/master/D/amd.cpp), why author uses two networks? Besides, it is unclear, why additional vertices S and T are used, when source s and sink t are already defined?
3) Author mentions that we have two kinds of edges for red ones and blue ones. How it is realized there?
Thank you in advance.