摘要: 给一个n个点、m条边,无自环的无向图,每个顶点有一个颜色值,在出现过的颜色值中找到一个有最多相邻的颜色值,如果有多种相同的,输出一个小的。 1 const int maxn = 100011; 2 set<int>s[maxn]; 3 int c[maxn]; 4 bool vis[maxn]; 5 6 int main(){ 7 #ifndef ONLINE_JUDGE 8 freopen("in.txt", "r", stdin); 9 #endif10 int n, m, a, b;11 scan_d(n);12 scan_d(m... 阅读全文
posted @ 2012-11-22 11:07 pony1993 阅读(257) 评论(0) 推荐(0) 编辑

View My Stats