I am getting WA for CSTREET - Cobbled streets
However, i have tried various test-case and all my test case passes the code.
Test case tried
stdin :
4
1
7
9
1 6 10
6 5 25
5 7 24
5 4 22
4 3 12
7 2 14
1 2 28
2 3 16
7 4 18
2
5
7
1 2 1
2 3 2
2 4 6
5 2 1
5 1 3
4 5 2
3 4 3
1
5
4
1 2 2
3 2 3
2 5 5
4 2 4
2
4
3
1 2 2
2 3 2
3 4 2
stdout :
99
12
14
12
Please suggest test-case to fail the code.
Thanks in advance !!