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

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

Can you help? Had anyone got WA#8?
Послано maksay 5 дек 2007 00:43
I've got WA8 using NlogN algo with 3\4 and 1\4 of numbers/ If somebody had same problems please help or give some tests
Re: Can you help? Had anyone got WA#8?
Послано vesib 17 мар 2008 14:09
i had :)
I used heap
my mistake was when n is even, I  didn't check which of the two successors of the biggest element is bigger
for example
n=10
1 2 3 4 5 6 7 8 9 10
my output was 5.0 because i took 6 (the biggest element left)
but i took also 4 instead of 5  (the heap was 6 4 5 ...
and there was no check whether 4>5)

Edited by author 17.03.2008 14:09