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

Обсуждение задачи 1019. Перекрашивание прямой

If you wa 2 or 3
Послано Li_Ke[NEU] 13 ноя 2011 16:09
Attention:

At the beginning, [0, 1000000000)is white,and the second test's output is [..., 1000000000), and in fact you have to deal it with[0, 1000000000 - 1), or you'll got wa. I don't know why!


Forgive my english:)

Edited by author 13.11.2011 16:28
Re: If you wa 2 or 3
Послано lpeter83 13 ноя 2011 16:37
I saw your solution run at 0.046s, it was really fast. however I use segmentTree to get accept at 0.64s. what kind of algorithm do you use?
Re: If you wa 2 or 3
Послано cs_Diablo 22 дек 2011 02:44
I don't know what you have been doing, but the bruteforce is 0.156s which is 4.4 times faster than your idea. What I'm trying to say is that you dont need segmentTrees for this problem, unless you want to exercize on them; the naive approach is also very fast :)