CodeForces - 258B - B. Little Elephant and Elections(数位dp+dfs)

NoSuchKey