12430 - Grand Wedding
Moderator: Board moderators
-
- New poster
- Posts: 37
- Joined: Wed Mar 14, 2012 11:57 am
- Location: Bangladesh
- Contact:
Re: 12430 - Grand Wedding
Apparently we need to print -1 when we have to remove all roads. I couldn't figure this out by reading the statement. Not to mention, the statement doesn't have any constraints! I assumed both N and M to be less than 10^6. Hope this helps.