DP on Tree with Prefix sum
Can anyone please explain how this problem can be solved?
Codeforces Round 1094 Solution Discussion