codeforces 1338 B. Edge Weight Assignment

NoSuchKey