|  | 
|  | 
| вернуться в форум | WA5 Test So I was checking if the 2 vertices of the graph already connected, but didn't consider the test below and wasted a lot of time looking for a mistake and rewriting the code
 4 3
 1 2 1
 3 4 2
 2 3 3
 
 Correct output:
 3
 3
 1 2
 3 4
 2 3
 
 My output:
 2
 2
 1 2
 3 4
 | 
 | 
|