Beyond Expectation [HCODE06] from Honour Code

Can anyone help why my solution gives WA? https://www.codechef.com/viewsolution/29276001
I add contribution for each edge, and it is similar to some of the AC codes.

1 Like