Tom the cat is chasing Jerry the mouse again! Jerry is trying to gain some advantage by running into crowds of pigeons, where it is harder for Tom to follow him. Conveniently, Jerry arrived to Central Park in Ljubljana. The park has $n$ statues, numbered $1...n$, and $n−1$ non-intersecting passages connecting them in such a way that it is possible to reach any statue from any other statue by traversing the passages. Clustered tightly around each statue $i$ there are $p_i$ pigeons. Jerry has $v$ breadcrumbs in his pocket. If he drops a breadcrumb by a statue at his current location, pigeons from neighbouring statues will immediately fly to this statue to eat the breadcrumb. As a result the current number of pigeons $p$ around this and neighbouring statues changes.
It all happens in the following order: First, Jerry arrives to the statue $i$ and meets $p_i$ pigeons. Then, he drops the breadcrumb. He leaves the statue. The pigeons from neighbouring statues move to statue $i$ before Jerry arrives to the next statue (so they don’t count towards his count of the pigeons met).
Jerry may enter the park at any statue, run down some passages (but never using the same passage twice), and then leave the park anywhere he wants. After Jerry exits the park, Tom will enter and traverse exactly the same route. By dropping at most $v$ breadcrumbs, Jerry wants to maximize the difference between the number of pigeons Tom will meet on the route and the number of pigeons he meets. Note that only pigeons that are present at some statue right before Jerry arrives there count toward the total number of pigeons he meets. See the comment of the example for further explanation.