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

Обсуждение задачи 1254. Крепкий орешек

WA7
Послано rohit 12 апр 2011 03:18
What's special in test 7 ? I tried all the tests given here and I get right answer.

My algorithm is to use bfs to calculate shortest path from source to each destination. If destination is reachable, source is updated to destination else source remains same.
Anything wrong with my method ?
Re: WA7
Послано Erop [USU] 2 май 2011 22:47
may be some problems with precision?
Re: WA7
Послано Velea Alex 26 авг 2011 01:41
I got the same problem .. i have WA7 ..
I used BFs .. O(n*m*k) with 2 quest .. one for the blocks whose were reached by vertical or orizontal moves ( last move ) and another for those who were reached with diagonal moves (last move counts only again .. )

with this i do not need to use Heap :( but i got a problem .. i triend almoast every test .. and they worked .. but still WA7 .. :(

my prog. it's not written so well ... so i will not post it .. if you think that it will help you .. ask for it : )

i will keep in touch with this thread :-S