image

from AtCoder Library Practice Contest ACLPC_E E - MinCostFlow

  • image
  • In Flow’s words, “less than K chosen” means “K edges of capacity are connected.”
  • The squares to be chosen are kept on the sides with capacity 1, and the side with the flow when the minimum cost flow is found is the “chosen square”.
  • We can make sure that the options that gain X when you choose them cost you a large value INF when you don’t choose them, and cost you INF-X when you do choose them.
    • imageimage
    • image

This page is auto-translated from [/nishio/ACLPC E](https://scrapbox.io/nishio/ACLPC E) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.