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

Обсуждение задачи 1028. Звёзды

My solution is O(N*logN), that it works 0.062 sec!!!
Послано Urban Alexandr(PetrSU) 23 мар 2005 23:27
My solution is O(N*logN), that it works 0.062 sec!!!
But use 680 Kb.

I used data structure with the title "Tree in massive".
what is "Tree in massive"
Послано Dilyan 10 май 2005 02:11
My algo is also O(N*logN)0.062 but I used a structre calles
Dinamic Ordered Statistics(Index tree). can you tell me what kind of data structure is "Tree in massive" and from where I can learn more ?
Re: what is "Tree in massive"
Послано Burunduk1 10 май 2005 04:17
This structure is like Index tree.
Re: what is "Tree in massive"
Послано BFL 22 май 2005 22:27
and what is index tree.
where can I find about it?
Re: what is "Tree in massive"
Послано wang yin 18 мар 2006 19:17
I got ac in 0.062 sec,too.
I use treap.
Re: My solution is O(N*logN), that it works 0.062 sec!!!
Послано SPIRiT 17 апр 2006 16:00
Is tree in massiv the same thing as Red-Black trees?
I think it's also possible to use RB-trees, becaues it's also O(N*logN).
Re: My solution is O(N*logN), that it works 0.062 sec!!!
Послано Burunduk1 18 апр 2006 01:17
Tree in massiv is much easier than RB-trees.
In two words tree in massiv is following structure:

Node T contains F([a,b]) and if b-a > 0 its children
contain F([a,(a+b)/2]) first and F([(a+b)/2,b]) second
(else T is a leave).
Using this structure we can update F[x] in O(logN) and
get F[l,r] also in O(logN) where N is length of the
interval in the root.
In this problem F = number of stars on the inrterval.
Re: My solution is O(N*logN), that it works 0.062 sec!!!
Послано KIRILL 28 сен 2006 18:51
My 450 byte O(N*sqrt(N)) Pascal solution
works 0.031 sec and uses 240Kb
Re: My solution is O(N*logN), that it works 0.062 sec!!!
Послано Yermak 27 фев 2007 22:01
Hurrra! My solution worked 0.015 seconds!
Re: My solution is O(N*logN), that it works 0.062 sec!!!
Послано Alias (Alexander Prudaev) 11 дек 2007 09:13
"tree in massive", "tree in massiv"
"massiv" is russian word and it mean array.
"tree in array"