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

Обсуждение задачи 1080. Раскраска карты

all tests worked, but!
Послано Peca 7 авг 2012 18:16
Dear all,

all tests I found in this discussion worked, but when I run my code I do have WA on test 7 (or 13 for another version of my code). Can someone please give a kind of inputs with some test? I checked everything I could think of and it worked.

Thank you!
Re: all tests worked, but!
Послано Andrew Sboev [USU] 7 авг 2012 18:26
Input:
4
4 0
3 0
4 0
0

Output:
0101
Re: all tests worked, but!
Послано Peca 12 авг 2012 16:00
Thank you for the answer.
The following tests are working, but when I submit I do have WA2.

I.

3
2 0
3 0
0
result: 010

II.
4
4 0
3 0
4 0
0
result: 0101

III.
5
2 5 0
3 0
4 0
5 0
0
result:-1

IV.
5
2 3 4 5 0
0
0
0
0
result: 01111

V.
6
2 4 6 0
3 5 0
4 6 0
5 0
0
0
result: 010101

VI.
0
result :-1

I am using bfs, of course with a queue implementation.
Re: all tests worked, but!
Послано Andrew Sboev [USU] 12 авг 2012 16:05
Hmm, but I used dfs and have no problems :)
Re: all tests worked, but!
Послано Peca 12 авг 2012 17:51
Maybe I will try also dfs. I still do not understand why bfs would not work (well a little modified). It seems that I have now WA#2. Does somebody knows test #2 (except those written above.)? Thank you.
Re: all tests worked, but!
Послано Peca 12 авг 2012 18:35
I have got accepted with a version of bfs modified.
I also found the problem in my implementation.

Once I succeeded for test below and all others from above, I got AC. Thank you for your help.

6
2 3 0
4 0
5 0
6 0
6 0
0

result: 011001