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

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

got AC time=0.25
Послано buggzy 2 апр 2004 14:56
...and without re-reading input. O(N*logN) sometimes faster then O(N) ;-) Nice problem.

Edited by author 02.04.2004 15:27
Re: got AC time=0.25
Послано Илья Гофман (Ilya Gofman) 2 апр 2004 21:59
could you please open up your secret? at leaest a bit? many people are worried about it:)))
Re: got AC time=0.25
Послано buggzy (USU) 2 апр 2004 22:30
I guess you confused me with the very best man who solved this  problem in N/2 memory. Sorry, I'm just Ilya Teterin from contest.ur.ru forum :), so I'm interested in the "secret" too ;)
Re: got AC time=0.25
Послано BloodMage 3 апр 2004 11:41
Use a data structure of Heap
Heap can help you insert in O(logn) and "pop" the biggest/smallest item in O(logn), and to realise it you need only a array.
With "Heap" we can solve this problem so easily. Read half of the data from the input, and then read one, pop biggest/smallest one, you can find at last pop one/two time(s), the midest number is found!!
Re: got AC time=0.25
Послано jedimastex 3 апр 2004 14:34
hay, can you send solution to email mathit@mail.ru
;->

Edited by author 02.01.2006 17:04
Re: got AC time=0.25
Послано buggzy (Ilya Teterin - USU) 3 апр 2004 16:52
I made "gcc median2.cpp -o median2.cpp" yesterday ;) If you familiar with GNU C compiler you will understand...
Re: got AC time=0.25
Послано I_want_to_be_The_Best 31 май 2005 11:11
i got AC time=0.14 !!