SCU 2007 warmup contest 15

C: Cut the Sequence