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

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

1028 Stars
Послано ManWithoutFace (USU) 26 мар 2001 13:45

My solution is 462 bytes long and works 0.12 sec!
Who smaller? :-)
Re: 1028 Stars
Послано Roman V. Alekseenkov 26 мар 2001 17:28
>
> My solution is 462 bytes long and works 0.12 sec!
> Who smaller? :-)
>
>
xe...xe... ;-)
O( N * sqrt(N) ) ? ;))
Re: 1028 Stars
Послано Petko Minkov 26 мар 2001 19:29
>
> My solution is 462 bytes long and works 0.12 sec!
> Who smaller? :-)
>

My smaller! My program is 197 bytes, runs in O(N*N)
time and is the obvious thing everybody writes. It can
become even smaller if i delete the spaces but that won;t
be fair :) and even now the code is quite unpretty.

BTW i think the judge here can report different execution
times for different submissions so 0.12 may become 0.10
or 0.15 if you submit it now.
Re: 1028 Stars
Послано ManWithoutFace (USU) 27 мар 2001 09:57
> xe...xe... ;-)
> O( N * sqrt(N) ) ? ;))

No. O(15*N)
Re: 1028 Stars
Послано ManWithoutFace (USU) 27 мар 2001 09:58
> My smaller! My program is 197 bytes, runs in O(N*N)
> time and is the obvious thing everybody writes. It can
> become even smaller if i delete the spaces but that won;t
> be fair :) and even now the code is quite unpretty.
>
> BTW i think the judge here can report different execution
> times for different submissions so 0.12 may become 0.10
> or 0.15 if you submit it now.

And does it pass new timelimit?
Timelimit for this problem is 1 second now.
O(15*N)==O(N), that's the basics of the mathematic analysis. did you mean O(N*lnN) ?
Послано Ilya Semenov (NSU) 28 мар 2001 22:26
> > xe...xe... ;-)
> > O( N * sqrt(N) ) ? ;))
>
> No. O(15*N)
>
Re: 1028 Stars
Послано Petko Minkov 29 мар 2001 03:09
> And does it pass new timelimit?
> Timelimit for this problem is 1 second now.

my new solution works in 0.22 and is 351 bytes.

Well its complexity is not O(NlogN) but it's obviously
fast enough
Re: O(15*N)==O(N), that's the basics of the mathematic analysis. did you mean O(N*lnN) ?
Послано ManWithoutFace (USU) 29 мар 2001 09:23
> O(15*N)==O(N), that's the basics of the mathematic
analysis.
> did you mean O(N*lnN) ?

I know it. But if I write O(N) nobody believe me.
And I didn't write O(N*lnN) because when N = 2, my solution
does 30 iterations.
My program is the fastest
Послано Doctor Lamer 19 май 2001 13:14
My solution isn't very small but it's fast, written on
PASCAL (!!!), time=0.06s (see problem statistics)... Who
can write FASTER???
Re: 1028 Stars
Послано shitty.Mishka 15 окт 2001 18:38
My runs in 0.08 seconds (but it's 753 bytes :)
Re: O(15*N)==O(N), that's the basics of the mathematic analysis. did you mean O(N*lnN) ?
Послано Foo Chuan Sheng 5 дек 2001 18:43
> > O(15*N)==O(N), that's the basics of the mathematic
> analysis.
> > did you mean O(N*lnN) ?
>
> I know it. But if I write O(N) nobody believe me.
> And I didn't write O(N*lnN) because when N = 2, my
solution
> does 30 iterations.
>
>
Do you understand O notation?
It says that for large enough N, the behavior of the
function that describes the running time of your program
tends to the function given. It does not assert that the
running time of your program is always equal to a constant
value of the function given.
Re: O(15*N)==O(N), that's the basics of the mathematic analysis. did you mean O(N*lnN) ?
Послано ManWithoutFace (USU) 10 дек 2001 15:07
> Do you understand O notation?
> It says that for large enough N, the behavior of the
> function that describes the running time of your program
> tends to the function given. It does not assert that the
> running time of your program is always equal to a constant
> value of the function given.

Yes, yes, yes.
It's O(N). But I gave some hint, when wrote O(15*N)
Re: O(15*N)==O(N), that's the basics of the mathematic analysis. did you mean O(N*lnN) ?
Послано Mephistos 20 дек 2001 01:18
> > Do you understand O notation?
> > It says that for large enough N, the behavior of the
> > function that describes the running time of your program
> > tends to the function given. It does not assert that the
> > running time of your program is always equal to a constant
> > value of the function given.
>
> Yes, yes, yes.
> It's O(N). But I gave some hint, when wrote O(15*N)
>
I think you're mistaken, 'cause if you can solve the problem with the
time O(n), then you can sort arbitrary array with the same time, wich
is impossible.
Re: 1028 Stars
Послано Algorithmus_UA(algorithmus@univ.kiev.ua) 11 мар 2002 18:17
> My runs in 0.08 seconds (but it's 753 bytes :)
My runs 0.06 & olny 635 bytes!
Re: O(15*N)==O(N), that's the basics of the mathematic analysis. did you mean O(N*lnN) ?
Послано Alyosha Popovich 14 май 2002 14:58
This is not an arbitrary array. The positions are integers smaller
than 32000. Sorting this kind of arrays is linear with countsort.



> > > Do you understand O notation?
> > > It says that for large enough N, the behavior of the
> > > function that describes the running time of your program
> > > tends to the function given. It does not assert that the
> > > running time of your program is always equal to a constant
> > > value of the function given.
> >
> > Yes, yes, yes.
> > It's O(N). But I gave some hint, when wrote O(15*N)
> >
> I think you're mistaken, 'cause if you can solve the problem with
the
> time O(n), then you can sort arbitrary array with the same time,
wich
> is impossible.
Re: O(15*N)==O(N), that's the basics of the mathematic analysis. did you mean O(N*lnN) ?
Послано Aarontony 30 сен 2004 15:04
My code works on 0.015S