USACO Training milk6
Hecking DONE with 4.4! Attempt 1 (WA 1/12) I tried using a straightforward max-flow min-cut as described my USACO, calculating the max flow and then enumerating over the edges in increasing weight order, testing if the removal of an edge decreases the max flow, and if so, removing this edge. RESULT: After some preliminary debugging this passed the sample test case, but failed on the second case, due to the requirement that the amount of edges must be minimized. CONTEMPLATION: Here Teacher Huang advised me to undertake the method of "multiply input edge weight by 10000 and add 1" to account for the weighting of edge count as well, but I refused to believe this, as if we have a graph of the following edge list: (1, 2) weight 1 -> weight 10001, i.e. edge #1 (1, 2) weight 1 -> weight 10001, i.e. edge #2 (2, 3) weight 2 -> weight 20001, i.e. edge #3 Here, the max flow is obviously 20001, but the USACO algorithm will deduce the edges #...