USACO 2013 February Contest, Silver - perimeter