Shark CodeForces - 982D(解法二:并查集)

NoSuchKey