Flow on Tree

Limits: 1s, 512 MB

Mr. Kaboom has recently learned about maximum flow. Now his friend Mr. Taboom gave him this problem.


This is a companion discussion topic for the original entry at https://toph.co/p/flow-on-tree