Codeforces Round 1105 Upsolving (finished)