Codeforces 1339 D. Edge Weight Assignment(构造)

NoSuchKey