Codeforces-1131D:Gourmet choice(拓扑+并查集)

NoSuchKey