CodeForces - 505B Mr. Kitayuta's Colorful Graph(二维并查集)
题目链接:http://codeforces.com/problemset/problem/505/B点击打开链接B.Mr.Kitayuta'sColorfulGraphtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputMr.Kitayutahasjustbought