Codeforces Round 876 Solution Explanations (finished)