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

Обсуждение задачи 1603. Эрудит

stop asking #3 WA - HINT here
Послано melkiy 10 мар 2009 07:20
To all of you who cannot overcome #3 !!!

All the suggestions about redundant '\n' and about that the dictionary may have repeated words have nothing to do with WA #3 (read condition carefully).

If you use any kind of backward tracking, be it recursion or DFS, check the "no luck" condition attentively. First i used checking the next letter to be '\0' at the beginning of my recursion function, and if so returned 'true'. This is wrong! You must make word-end check BEFORE you make the next step, otherwise you may get "deadlock" "there is no direction to go" though there is no need to go anymore!!!

Test word for the example table
rabadaabracabrac: YES
(starting from [3,1] in C-like indices).
Re: stop asking #3 WA - HINT here
Послано fuch_prog_er 28 мар 2009 21:36
How did you get rabadaabracabrac: YES
In the condition there is said,that words could not have self-intersections. But if you don't intersect you will not get this word.
My program writes NO on this test
Re: stop asking #3 WA - HINT here
Послано Moonstone 25 июн 2010 13:43
Thank you, melkiy! I made the same mistake :(
Re: stop asking #3 WA - HINT here
Послано TheDreamCatcher 30 ноя 2010 07:42
My program got YES on this test, by have WA#3
Re: stop asking #3 WA - HINT here
Послано Edgar Rokyan 4 окт 2011 23:48
Thanks!
Re: stop asking #3 WA - HINT here
Послано BiteBoy [ONU] 9 окт 2011 17:26
Thanks a lot!
Re: stop asking #3 WA - HINT here
Послано xpahos 19 апр 2016 02:42
It's not a test case for WA#3:

rabadaabracabrac: YES and it's not working.
Re: stop asking #3 WA - HINT here
Послано PrankMaN 10 май 2020 04:24
My reason for WA #3 was that I tried to use 1d char array to store the table and used i -> i - 1 to go left and i -> i + 1 to go right, however, if you are in the first column you can't go left and if you're on the 4th row you can't go right