SCU 2006 warmup contest 19

B: The Bug Sensor Problem