Printer Queue
Time Limit: 1000MS | Memory Limit: 65536K | |
Total Submissions: 2817 | Accepted: 1523 |
Description

Because some jobs are more important than others, the Hacker General has invented and implemented a simple priority system for the print job queue. Now, each job is assigned a priority between 1 and 9 (with 9 being the highest priority,
and 1 being the lowest), and the printer operates as follows.
- The first job J in queue is ta