|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||128 MB||0||0||0||0.000%|
Having run into trouble with current online auctions and buyers that win auctions and then back out, you decide to open a new enterprise that has the bidders deposit funds before they may bid on any item. If they win an auction, the amount they bid is immediately (that second!) deducted from their account. (The problem of sellers that don’t deliver the items will be left for another day.)
You must write a program to implement the rules of this auction. You will be auctioning off a number of items, each of which will have a reserve price that must be met. Each of your bidders will deposit funds with you, and you must match these funds with items they successfully bid for. You will write a program that tracks the auctions during a single day and outputs the results of each auction.
- Auction Rules
You are guaranteed:
Bidder numbers and item numbers are unique within each category, but a bidder may have the same number as an item. Bidder and item numbers are not necessarily assigned sequentially.
An auction is won by the highest bid that:
There are 3 sections in the data file, describing the items available for bid, the registered bidders, and the bids made during the auction.
Output one line for each item being auctioned, in order of their auction finish time, listing
Item <item number> Bidder <bidder number> Price <winning bid>
If there is not a winning bid for an item, for that item output
Item <item number> Reserve not met.
2 1 5.00 05:06:27 2 25.00 15:30:11 2 11 37.37 22 55.55 3 1 11 60.00 04:03:01 2 11 26.00 00:18:03 2 22 27.00 09:03:05
Item 1 Reserve not met. Item 2 Bidder 22 Price 27.00