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

About problem text
Posted by GeGe 5 Oct 2004 20:13
What is correct answer for
BID 1000
BID 100
SALE 1 1
SALE 1000 1
QUIT
My answer is 0.02, but in task written "The first K customers who offered the same or higher price get one pig each.". Consequently the answer will be 0.01. What answer correct?
Re: About problem text
Posted by Vedernikoff Sergey 13 Aug 2005 01:28
Read problem statement carefully!!!

From problem statement:
Вне зависимости от того, досталась ли покупателю болванка из очередной партии, его заявка остается в силе и действует до тех пор, пока он в явном виде не отзовет ее.

That is, one bid can "buy" very many disks, and it doesn't matter, who will receive them: quantity of disks sold is min (k, <quantity of bids with price less or equal than k>). That is, in former example the right answer is 0.02!