|
|
back to board2Admins (!) tests are incorrect Please, explain me why answer is always YES? It's right only for connected graphs! For example: 6 6 1 2 2 3 3 1 4 5 5 6 6 4 Answer is NO. Re: 2Admins (!) tests are incorrect Oh, what a trick! I was very much confused seeing > 400 people who solved this problem. I'm really annoyed beacuse in this case the problem is O(n + m) using a simple idea gcd(n,n + 1) = 1. But if the graph can be disconnected everything is much worse!!! Re: 2Admins (!) tests are incorrect Posted by KingPin 25 Dec 2005 03:43 Graph can be disonnected. Sample is. But testset is weak... Why am I not surprised :) My always "YES" program got AC. 2Admins: Please, fix this problem! With such tests the problem is much easier than it is. Please, change tests or statements! Fixed (+) Graph is always connected now. Statements and tests are updated. So, the solution always exists. |
|
|