|
|
вернуться в форумUmm, I just used the method which you will use when you face this problem as an elementary school maths exercise. 1. sort these orders for the following for loop; 2. can I serve current order? is there a not used day left for it? wow, that's easy if I can use std::set::upper_bound; 3. output our selected orders with delivery time. // wow accepted, so lucky I am. // after checked the discussion, found that this problem can be easily solve with priority queue, looks that priority queue is more convenient. |
|
|