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 1139. City Blocks

For Vladimir Milenov Vasilev: I know what you have to do to get AC with 1139!
Posted by shitty.Mishka 29 Nov 2001 01:02
Use
inter:=trunc(r*i+0.0000001)-trunc(r*(i-1)-0.0000001);
instead of
inter:=trunc(r*i)-trunc(r*(i-1));

I had the same problem as you. By the way, on my computer I
couldn't find a test where your program would give the
result that differs from the result of my program, and I
can't explain why do we have to use those 0.0000001. By the
way, see problem 1030 - if you try to submit it, you will
face similar problems...

Good luck!

To Rybak Michael
Posted by Vladimir Milenov Vasilev 29 Nov 2001 01:16
Thank you very much for your help, but I got Accepted jist
making the cicle to (n div 2) insted to n. Although It was
very nice of you to help me - thanks again, if I can I
would help you,too. Bye!