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 1124. Mosaic

Why WA?
Posted by Zmy 17 Feb 2002 09:05
The number of movements=the number of lines in the graphs+the numbers
of subgraphs(except the subgraphs with only one point)-1.Isn't it
correct?
But i got a WA. What's the matter?
Re: Why WA?
Posted by Ursachi Ionut 30 Mar 2002 13:26
> The number of movements=the number of lines in the graphs+the
numbers
> of subgraphs(except the subgraphs with only one point)-1.Isn't it
> correct?
> But i got a WA. What's the matter?

This is my solution too . I got WA . And I don't know why .
Maybe your error is this : if the grapf has 0 edges ...
Here is a test :
3 1
1
2
3

The solution is 0 not -1 .
Re: Why WA?
Posted by Chidori 15 Nov 2005 16:34
Thank you very much I just change -1 to 0 then get accepted. If you still wa i can give you my program.