|
|
back to boardBy my mind, my solution is right. It builds a shedule of transporting with maximal money values superseding least values before that time. But my solution falls on ninth test. I think that something wrong with that test. There are greedy simple solution. Just sort works into descending order of profits and process them sequentally. Oh! Thank you! I've got AC. My time is 0.001. And then what in case of test? 1 3 2 9 4 1 4 1 2 2 5 2 2 Answer: 2 1 3 More likely a test like: 4 2 2 2 3 3 4 3 5 will yield WA9. 9 1 100 1 50 1 150 2 10 2 20 2 10 3 5 3 7 3 5 ---------- 3 3 5 8 |
|
|