摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 100000+10; 5 int fa[maxn]; 6 void init(int n)//初始化 7 { 8 f 阅读全文
posted @ 2020-02-07 14:38 Caecae_with_island 阅读(180) 评论(0) 推荐(0)
摘要: 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整 阅读全文
posted @ 2020-02-07 14:34 Caecae_with_island 阅读(229) 评论(0) 推荐(0)
摘要: 题目描述:Today is Ignatius’ birthday. He invites a lot of friends. Now it’s dinner time. Ignatius wants to know how many tables he needs at least. You hav 阅读全文
posted @ 2020-02-07 14:29 Caecae_with_island 阅读(210) 评论(0) 推荐(0)