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

Discussion of Problem 1148. Building Towers

How to solve it fast?
Posted by Burunduk1 14 Mar 2006 22:26
n <= 2400
My AC solution is O(h*n*(m+h) + k*h^2*n*(m+h))
And it uses O(n*(m+h)) of memory.

But there are so many AC in 0.015 sec!
And some AC program's use less than 200K of memory...

I can't invent something like myself :(
Please, anybody explain me fast solution for this problem.
Re: How to solve it fast?
Posted by Grebnov Ilya[Ivanovo SPU] 15 Mar 2006 02:03
Mail me to Ilya[dot]Grebnov[at]mail[dot]ru
Re: How to solve it fast?
Posted by Kit 15 Mar 2006 10:29
It is easy. Tests are weak :) My solution uses 400kb instead of 3Mb and works 0.015s instead of 0.5s. It seems, there are n less then 100 or greater then 5000 always. You can use it.
Thank you for your answers
Posted by Burunduk1 15 Mar 2006 15:22
:)