Codeforces Round 1070 (Div. 2) E. Remove at the lowest cost Hints: Remove at the lowest cost Code: Remove at the lowest cost