atcoder / ac-library

AtCoder Library
Creative Commons Zero v1.0 Universal
1.84k stars 236 forks source link

optimize mcf #82

Closed yosupo06 closed 3 years ago

yosupo06 commented 3 years ago

I optimized (the constant factor of) the mincostflow runtime.

I checked that this changes doesn't degenerate the performance.

Problem List(Warning: Spoiler) AtCoder Library Practice Contest E (47 -> 36ms) - https://atcoder.jp/contests/practice2/submissions/18766642 - https://atcoder.jp/contests/practice2/submissions/18766655 AGC 031 E (143 -> 105ms) - https://atcoder.jp/contests/agc031/submissions/18766903 - https://atcoder.jp/contests/agc031/submissions/18766914 AGC 034 D (426 -> 226ms) - https://atcoder.jp/contests/agc034/submissions/18766604 - https://atcoder.jp/contests/agc034/submissions/18766613 AGC 043 F (99 -> 56ms) - https://atcoder.jp/contests/agc043/submissions/18769236 - https://atcoder.jp/contests/agc043/submissions/18769242