Codeforces Round #675 (Div. 2) D. Returning Home【思维建图,最短路】

NoSuchKey