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

Could anybody tell my why does my program get ML?(+)
Posted by shitty.Mishka 4 Feb 2002 15:07
I tried to submit my program  with Comp or Extended and got WA, so I
used long arifmetics, and now I get ML even if I put the maximal
length of the number to be 5 digits!

Here's my program:

[deleted by moderator]

Edited by moderator 11.04.2004 01:33
Re: Could anybody tell my why does my program get ML?(+)
Posted by <P><P><P> 6 Feb 2002 01:43
It really uses small memory, and solution with comp(extended) type
is good (as I think) too, but..
Try this test case:
302 60 10
All the error of the algorithm is TL! (maybe, dynamic?..)
Re: Could anybody tell my why does my program get ML?(+)
Posted by Benone Sinulescu aka Benny 15 Aug 2002 01:54
The number of towers is less than 2^59 (each new level is either +1
or -1). Comp/__int64 has got 64 bits, so long numbers shouldn't be
needed.

>
> [deleted by moderator]

Edited by moderator 11.04.2004 01:34