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

Samsonov Alex [USU] What kind of round? [2] // Problem 1316. Electronic Auction 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?
Sandro (USU) Re: What kind of round? [1] // Problem 1316. Electronic Auction 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.
Michael Rybak (accepted@ukr.net) I used printf("%.2lf\n", sold / 100.0 + 1e-9) (-) // Problem 1316. Electronic Auction 20 Feb 2006 13:34
-