摘要: 题目链接:http://codeforces.com/gym/100923/problem/H 分析:并查集,用enemy储存x的敌人,用weight储存权重决定根节点 需用scanf和puts输入输出否则会爆 阅读全文
posted @ 2019-08-01 15:28 Veasky 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/682/C 分析:存图,用dfs跑一遍,详细见注释 阅读全文
posted @ 2019-08-01 12:24 Veasky 阅读(170) 评论(0) 推荐(0) 编辑