Codeforces Round #642 (Div. 3)D. Constructing the Array(广度优先搜索)

NoSuchKey