kcits970   1년 전

If the same vertices are queried, then the answer is trivially zero.

input:
3
1 2 100
2 3 200
4
1 3
1 1
2 2
3 3

expected:
300
0
0
0

댓글을 작성하려면 로그인해야 합니다.