|
|
вернуться в форумwhat is the correct answer for.. BID 0.01 BID 10000 BID 5000 BID 5000 SALE 7000 3 DEL 5000 SALE 3000 3 SALE 0.01 3 QUIT ---------- i use the following logic: sum = 0.00 BID 0.01 BID 10000 BID 5000 BID 5000 SALE 7000 3 <=> BID 0.01 BID 5000 BID 5000 sum = 0.01 + DEL 5000 <=> BID 0.01 BID 5000 + SALE 3000 3 <=> BID 0.01 sum = 0.02 + SALE 0.01 3 <=> sum = 0.03 + QUIT sum = 0.03 Re: what is the correct answer for.. Hey you've turned it all upside down! Once a person said "BID X" it means he's not going to buy it for more! And.. where have you put BID 10000? Here's the correct logic: BID 0.01 BID 10000 BID 5000 BID 5000 SALE 7000 3//selling only 1 to person of 10000 <=> sum=0.01 DEL 5000 SALE 3000 3//selling 2 to 5000 and 10000 <=> sum=0.03 SALE 0.01 3//selling 3 to 0.01, 5000, 10000 <=> sum=0.06 QUIT any more questions?:) |
|
|