https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1786
uva user try has asked problem author for test cases,he sends tests to me,but there are two tests incorrect:
11 20
8 10 78
9 5 4
3 2 9
11 1 46
6 5 46
5 3 14
9 6 75
11 6 5 6 7 16
9 8 62
9 10 78
4 7 42
7 8 53
4 11 10
6 10 38 11 8 60
8 3 16
4 1 16
4 10 41
11 10 20
4 11 9
11 20
5 7 74
5 4 52
10 6 64
2 7 45
7 1 63
10 7 48
3 8 16
3 10 39
7 8 25
11 5 40
2 5 47
4 6 13
3 4 11
11 6 27
10 11 23
4 8 76
1 6 45
9 11 59
7 6 6
11 1 31
8 11 5
first tests offical answer is 163 but mine is 168.
second test offical answer is 202 but mine is 206.
you can used first edge sets:0,3,6,7,8,10,11,12,13,14,17,18,19 to run first troops. its max_flow value is 108.
and use remain edges to run second troops.its max_flow value is 60 . so 163 is definetly incorrect..
sencond test is similar;
you use first edge sets:1,3,5,6,7,8,10,11,12,15 to run first troops .its max_flow value is 109;
use other edge sets to run second troops it is 97
so second answer is 206