ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

1028: unexpected TLE
Posted by Dmitry S. Lyubshin 14 Oct 2000 13:20
Anybody who has 1028 accepted, leave a note please. I have
an N*log(N) algorithm that must FLY into the time limit for
N<30000, but it doesn't. It passes all tests from the Ural
championship easily.
Re: 1028: unexpected TLE
Posted by ManWithoutFace (USU) 14 Oct 2000 15:14
> Anybody who has 1028 accepted, leave a note please. I have
> an N*log(N) algorithm that must FLY into the time limit
for
> N<30000, but it doesn't. It passes all tests from the Ural
> championship easily.

IMO self-balancing binary tree would be very good here.
Re: 1028: unexpected TLE
Posted by Ilievski Bozidar 14 Oct 2000 16:11
> Anybody who has 1028 accepted, leave a note please. I have
> an N*log(N) algorithm that must FLY into the time limit
for
> N<30000, but it doesn't. It passes all tests from the Ural
> championship easily.

Just use the fact that input is in increasing
order of y and x.
Re: 1028: unexpected TLE
Posted by Petko Minkov 14 Oct 2000 23:52
> Anybody who has 1028 accepted, leave a note please. I have
> an N*log(N) algorithm that must FLY into the time limit
for
> N<30000, but it doesn't. It passes all tests from the Ural
> championship easily.

I got O(N^2) really nice and simple algorithm which
really flies like a bird! :). It got 0.1 second
before the time limit :)