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 1176. Hyperchannels

I got wa on test#3...Any trick???
Posted by tbtbtb 9 Apr 2004 16:55
Re: I got wa on test#3...Any trick???
Posted by Gheorghe Stefan 12 Apr 2004 15:43
no tricks, just an Eulerian cycle on the negative edges...
Re: I got wa on test#3...Any trick???
Posted by tbtbtb 12 Apr 2004 17:06
on the negative edges? Are there any differences with on the unnegative edags?
Re: I got wa on test#3...Any trick???
Posted by sloboz 12 Apr 2004 18:40
you have the adjacency(?) matrix. Negative means that you change 1 with 0 and 0 with 1. Then, on this new graph you make an Eulerian cycle. I can post my source if really need
Re: I got wa on test#3...Any trick???
Posted by tbtbtb 12 Apr 2004 19:27
I'm sorry I can't understand you. What does
"change 1 with 0 and 0 with 1." mean?
Re: I got wa on test#3...Any trick???
Posted by sloboz 13 Apr 2004 05:17
The problem gives you that binary matrix with a[i][j] = 1 if i and j are connected. Reversing 1 with 0 and vice-versa means that if i and j are connected than you unconnect them (i.e. a[i][j] = 0) and if they are not connected, a[i][j] = 0, you connect them, a[i][j] = 1.
You do this because the spaceship can build cannals that don't exist, so it must walk only between unconnected nodes. Covering all cannals that do not exist and return to the initial node is a cycle that covers all these unconnected edges once, exactly like an Eulerian cycle.
How did you pass the first tests if you didn't understand these?
With all respect.
Re: I got wa on test#3...Any trick???
Posted by tbtbtb 13 Apr 2004 07:55
Thank you! I mistook you at that time...Very sorry..
But I think I use the same method as you..Maybe there is something wrong with my code.
Still WA
Posted by tbtbtb 22 Apr 2004 19:08