ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1176. Гиперканалы

I got wa on test#3...Any trick???
Послано tbtbtb 9 апр 2004 16:55
Re: I got wa on test#3...Any trick???
Послано Gheorghe Stefan 12 апр 2004 15:43
no tricks, just an Eulerian cycle on the negative edges...
Re: I got wa on test#3...Any trick???
Послано tbtbtb 12 апр 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???
Послано sloboz 12 апр 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???
Послано tbtbtb 12 апр 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???
Послано sloboz 13 апр 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???
Послано tbtbtb 13 апр 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
Послано tbtbtb 22 апр 2004 19:08