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

Обсуждение задачи 1152. Кривые зеркала

Is there any trick?
Послано Junjie Liang 22 янв 2002 18:23
I'm using brute search with pruning, and all the cases which I tested
seems alright, but I still get WA. Is there any trick?

My code:

[code deleted]


Edited by moderator 28.07.2006 10:35
Brute force seems to be incorrect (+)
Послано shitty.Mishka 23 янв 2002 03:38
Try this test:
8
4 5 6 5 4 5 6 5

The answer of your program is 34, while the correct answer is 33:
4 5 6 5 4 5 6 5
4 * * * 4 5 6 5   - 24
4 * * * * * * 5   - 9
* * * * * * * *

My program uses BFS.

Hope this will help.

Good luck!
Now it's AC
Послано Junjie Liang 23 янв 2002 19:05
Thanks for your test. I found my mistake, but it was very inefficient
(4.11second). Do you know how some people solved it in less than 1
second?
Re: Brute force seems to be incorrect (+)
Послано [AESC USU] MajorM 26 июл 2006 22:13
Are you sure that correct answer is 33?
My program give answer 32
4 5 6 5 4 5 6 5
4 * * * 4 5 6 5 - 24
4 * * * 4 * * * - 8
* * * * * * * *

But I have WA3 (. May be I don't understand this problem
Re: Brute force seems to be incorrect (+)
Послано Samsonov Alex [USU] 26 июл 2006 23:08
Your last step is incorrect. The balconies don't became circular after the shots. The distance between two final balconies is 4 in both directions, so the can't be destroyed by one shot.
Re: Brute force seems to be incorrect (+)
Послано ANZhigMAI 12 дек 2010 06:10
4 5 6 5 4 5 6 5
4 * * * 4 5 6 5 - 24
4 * * * 4 * * * - 8
* * * * * * * *
not like this?