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

Обсуждение задачи 1824. Ифрит-бомбардировки

WA8
Послано MOPDOBOPOT (USU) 25 мар 2011 19:53
I count the neighboring cities, which will destroy the explosion in the ith city. After that, output the citys which have not yet destroyed and with the largest number of neighbors (which fall under the explosion) until I have destroyed everything.
Simple BF but WA8 :(
Can anyone help me?
Maybe i forgot about any special case?

Edited by author 25.03.2011 19:56
Re: WA8
Послано Vedernikoff 'Goryinyich' Sergey (HSE: АОП) 25 мар 2011 22:38
In the 8th test it is optimal to bomb city which is already destroyed. During the contest I kept getting WA because of that...
Re: WA8
Послано MOPDOBOPOT (USU) 27 мар 2011 22:18
Thank you!
Now I count the number of alive near-citys on each step for each city hasn't been bombing.
And gets WA13 :)
Re: WA8
Послано Dawid Drozd 24 май 2011 13:09
This test Helps on WA8 :)
6 2
1 1
2 2
2 4
4 0
4 2
5 3

Answer:

2
2 5