Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

quinoa's blog

By quinoa, history, 6 years ago, In English
Spoiler
  • Vote: I like it
  • +30
  • Vote: I do not like it

»
6 years ago, # |
  Vote: I like it +8 Vote: I do not like it

In theory, you could use an algorithm by V.King, S.Rao and R.Tarjan running in .

In practice, you're probably better of using push-relabel running in . (My solution with it was fast enough even with two log factors and using __int128 in the flow algorithm due to worse flow graph modeling.)