ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1160. Network

WA5 Test
Posted by vtalgo23_Erbaev_336183 22 Apr 2023 14:15
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