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 1272. Non-Yekaterinburg Subway

If you have WA #14
Posted by Insectophob 11 Aug 2014 01:51
I hope these tests will be useful for you :)
4 5 0
3 4
1 2
3 1
2 4

and

7 7 0
1 2
1 3
2 4
2 5
3 6
3 7
4 7

The output must be 0 in both cases, but if you've done something wrong, it can be -1. Make sure your determination of connected components isn't wrong.
Re: If you have WA #14
Posted by mecing 16 Jan 2020 17:10
you gave the wrong 1 test
here's the correct
4 4 0
3 4
1 2
3 1
2 4
answer : 0