Efficient Traffic System

LightOJ - 1210