In modern factory production, pipelining mode(流水线生产) plays a quite important role. Only reasonable arrangement on tasks can assure a high level production efficiency. Now, the planners provide their manual arranged pipelining schedule table. But as there are too many machines and working procedures(工序), checking whether the schedule really works is not easy for them. So can you write a program to help them?
The pipelining mode follows these rules:
The products are produced and assembled(组装) step by step. The producing process strictly follows working procedures, which means only when all parts(零件) that the current procedure needed have finished their previous procedure, can the current procedure be carried out. And the previous part only can be produced or assembled by one part. Every machine starts at the same time and the pipelining mode strictly follows time order, that is they can’t be forced to wait.
2 3 3 1 1 0 2 3 0 3 5 1 4 3 4 3 0 5 3 2 1 7 6 1 1 5 4 7 2 0 8 3 0 9 2 1 2 10 1 0 2 2 1 1 0 2 3 1 3 2 3 2 0 4 2 1 1
Yes No