(思维+暴力)CodeForces - 1244 D Paint the Tree

NoSuchKey