| 4 | return d[i] == d[j] ? i < j : d[i] < d[j]; } }; |
| 5 | struct flow_network { |
| 6 | struct edge { int v, nxt, cap, cost; |
| 7 | edge(int _v, int _cap, int _cost, int _nxt) |
| 8 | : v(_v), nxt(_nxt), cap(_cap), cost(_cost) { } }; |
| 9 | int n; vi head; vector<edge> e, e_store; |
| 10 | flow_network(int _n) : n(_n), head(n,-1) { } |
| 11 | void reset() { e = e_store; } |