topcoder; solve "EllysTSP" from SRM #543 (Div. 2)