USACO 2.4.3 cow tours

floyd求图闭包+find-unite