摘要: 1 //我看过Discuss说不能用克鲁斯卡尔因为有很多边 2 //但是只能用G++过,C++的确超时 3 #include 4 #include 5 #include 6 using namespace std; 7 8 struct node 9 { 10 int a, b, cost; 11 }c[30000]; 12 int fa[505];... 阅读全文
posted @ 2017-07-25 20:22 ouyang_wsgwz 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXN 10005 8 int fa[MAXN]; 9 struct node 10 { 11 int from, to, len; 12 }arr[MAXN]; 13 14 bool cmp(no... 阅读全文
posted @ 2017-07-25 09:59 ouyang_wsgwz 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int maxn = 100005; 7 const int L = 100; 8 const int R = 100000; 9 int t, n, m, ans; 10 double total; 11 struct n... 阅读全文
posted @ 2017-07-25 09:26 ouyang_wsgwz 阅读(110) 评论(0) 推荐(0) 编辑