SCU 2006 warmup contest 19

G: A Scheduling Problem