← 返回 optiver 的题目列表Transport Scheduling System
类型:online_judge
You are managing a transportation company which must handle incoming orders:
Each order consists of multiple goods, each with a fixed size.
The company owns multiple airplanes, and each airplane has a fixed departure time and capacity.
Every order has a shipping time and can only be allocated to planes that depart after the order time.
Goods from an order can be split across multiple planes.
The goals are:
Determine if an order can be accepted.
If it can be accepted, return the allocation scheme for the goods.
Update the remaining capacity of the planes.
Implement the function process_order(...) to achieve the tasks mentioned above.
Example
Input
order_time=2, goods=[1, 2], planes=[{'departure_time': 3, 'capacity': 5}]
Output
Accept: [{