Educational Codeforces Round 169 (Div. 2) Solution (A & C) | Closest Point | Splitting Items in C++