in Sample Input, it’s 11 edges.
in Sample Output , it’s 22 edges.
in Explanation texts, in’s 11 edges,
but in Explanation pic, it’s 22 edges.
It’s so confusing!!!
From the things I googled, it’s 11 edges. every edge counts as 1 edge, which means this practice and the solution are wrong.
the correct answer in the the solution is sum/2.