Codeforces Round 1062 (Div. 4) Upsolving (finished)