Educational Codeforces Round 52 (Rated for Div. 2) D. Three Pieces

NoSuchKey