Add a dynamic programming implementation for C12_9_AvoidRoads using loop