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 1316. Electronic Auction

What kind of round?
Posted by Samsonov Alex [USU] 30 Aug 2005 18:33
So, it looks like Test 6 checks stuff like

BID 0.0149

Am I right?
If yes, what the hell should we use?
I used both:

cur=floorl(cur1*100.0+0.5);

and

cur=cur1*100;

WA6 both times. What the hell?
Re: What kind of round?
Posted by Sandro (USU) 3 Jan 2006 00:02
I think that your problem is not in kind of round. The first way should be ok.

I have WA6 too with some error. Try test:

BID 100
BID 101
BID 100.01
SALE 100.01 3
QUIT

My program doesn't work good in it.
I used printf("%.2lf\n", sold / 100.0 + 1e-9) (-)
Posted by Michael Rybak (accepted@ukr.net) 20 Feb 2006 13:34
-