Codeforces Round #523 (Div. 2) C Multiplicity (DP+动态数组)

NoSuchKey