Codeforces-solutions/Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2)