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

Обсуждение задачи 1871. Сейсмические волны

What is for test 28?
Послано Vitaliy Karelin 15 окт 2011 17:18
Re: What is for test 28?
Послано svr 15 окт 2011 18:32
I had wa28 when in dfs-search visited each string ony once,
but we must visit strings more than once if  coming to this person post became shorter.
Re: What is for test 28?
Послано morbidel 17 окт 2011 14:18
So Dijkstra looks like is needed.
Re: What is for test 28?
Послано svr 17 окт 2011 14:26
I used many dfs call from v=1 until stabilization("seismic waves from v=1")
Re: What is for test 28?
Послано rohit 17 окт 2011 22:39
I use bfs but I also get WA 28.
Re: What is for test 28?
Послано svr 17 окт 2011 22:47
You are using standard bfs, when once formed vertex skipped after,
but in this problem we must do processing of each event of vertex echivement
on subject of string length.
Re: What is for test 28?
Послано falicos 17 июн 2013 11:41
This test help me to solv WA28
10
0000000000000000000000000 2 444444444444444444444444 777777
11111111111111111111111 3 55 777777 8888
22222222 3 11111111111111111111111 444444444444444444444444 8888
3333 1 444444444444444444444444
444444444444444444444444 3 2 55 8888
55 3 3333 444444444444444444444444 6
6 2 22222222 444444444444444444444444
777777 3 444444444444444444444444 6 55
8888 3 11111111111111111111111 22222222 777777
999999999999999999999999 2 444444444444444444444444 55
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

answer

9
0000000000000000000000000
22222222
3333
444444444444444444444444
55
6
777777
11111111111111111111111
8888
Re: What is for test 28?
Послано Otrebus 8 дек 2015 23:27
Please note that falicos's test is incorrect; the line "444444444444444444444444 3 2 55 8888" implies there is a user named "2", which is not specified by the input and hence illegal. If you remove the "3" from that line you get legally formatted input with the given answer correct.

If you interpret the above test to mean there is a user named "2" with no followers, the answer would be

10
0000000000000000000000000
11111111111111111111111
2
22222222
3333
444444444444444444444444
55
6
777777
8888