| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 14921 | IdeaShop |
|
Description
IdeaShop, an online shopping company has created a special and unique truck system to deliver packages to customers efficiently. Each truck carries items based on their urgency, and the company uses a set of commands to manage all deliveries smoothly.

In order to make the system complete, the company needs you to implement the following commands:
1. add - When customers place an order, their items are added into the system. The packages are placed into the appropriate truck based on priority, making sure deliveries stay organized.
2. delete - If a customer changes their mind and cancels an order, the system will remove those items neatly from the trucks.
3. insert - Sometimes customers make special requests for faster delivery. In this case, their items are inserted directly into a specific position, helping them jump ahead in the queue.
4. move - If a customer is late in making payment, their package will be moved to a lower priority truck. If it reaches the lowest priority and still isn’t paid, the order will be removed from the system.
5. show - The manager can check the current arrangement of all packages at any time, viewing how items are distributed across the trucks.
6. promo - During special occasions, all packages (except those in the pending category) are consolidated into a single large truck, Bus B, for direct delivery. The items are then carefully rearranged using a strategic method to ensure better protection, especially for fragile packages.
Please refer to the attahced instruction file on eeclass for constraints and additional necessary information which is required to finish this assignment.
Input
The input are multiple lines consisting of different commands mentioned in the instruction. You need to handle each one of them and do operations accordingly.
Output
When show is entered, print out all the trucks in the system and the ids of the orders they are carrying, ordered by their urgency levels.