Codeforces Round #497 (Div. 2) C.Reorder the Array(贪心+优先队列)

NoSuchKey