All about problems in Volume 124. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
1 post • Page 1 of 1
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.
What ever happens, happens for good. Even when we get WA :p