Educational Codeforces Round 188 (Rated for Div. 2) D. Alternating Path Hints : Alternating Path Code : Alternating Path