[Codeforces 868F]Yet Another Minimization Problem

NoSuchKey