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

Обсуждение задачи 1306. Медиана последовательности

If you keep on getting MLE
Послано Olzhas2dy 29 июн 2007 02:22
This one is a really tough one. Even though solving it was kind of fun, I really got tired of it. I used a heap. I also tried priority_queue<T> template, but for some reason I was just keep on getting MLE on the test #7. I really don't know how other people made a good use of priority_queue<T>. My advise is simple - just use binary heap with "add to a heap" and "delete from a heap" operations. If you don't know what it is visit this site "http://en.wikipedia.org/wiki/Binary_heap"(I would pay attention to the part where the author describes an array implementation of it). Good luck.