Distance between vertices (#659) - Azerbaijan Computing Olympiad