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 1154. Mages Contest

IF you get WA 10 !!!
Posted by Akcium 28 Jul 2005 19:35
with code like this
if(lmastery-dmastery>maxdif)
    maxdif = lmastery - dmastery;

i got WA 10

but with
if(lmastery-dmastery>maxdif+1e-9)
    maxdif = lmastery - dmastery;
i got AC
Re: IF you get WA 10 !!!(1154 Mags contest)
Posted by svr 28 Jan 2007 10:39
I havn't rools for choosing right value eps=1e-9.
Insread I use more 10 times already my unit
for long arithmetics and have Ac.
In this problem I used fraction of tipe LongA/longA.
Of couse authors used flouts but my exact arithm and
author's rounding floats correspond and it is very very
surprisingly.
Except for roudindg problem is very simple and
dosn't demand any optimization for time and memory.
Re: IF you get WA 10 !!!(1154 Mags contest)
Posted by bsu.mmf.team 20 Jan 2011 19:51
Nice advice! Thank you.