D. Rarity and New Dress(思维+动态规划)Codeforces Round #662 (Div. 2)

NoSuchKey