Network Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 15268   Accepted: 5987   Special Judge Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the c…
[题意] n个点m条边的图 q次询问 找到一条从s到t的一条边 使所有边的最大危险系数最小 InputThere will be at most 5 cases in the input file.The first line of each case contains two integers N, M (2 ≤ N ≤ 50000, 1 ≤ M ≤ 100000) – numberof cities and roads. The next M lines describe the roads…
题目连接:problemId=542" target="_blank">ZOJ 1542 POJ 1861 Network 网络 Network Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Andrew is working as system administrator and is planning to establish a new network in his com…
本意是求最小瓶颈生成树,但是我们可以证明:最小生成树也是最小瓶颈生成树(其实我不会).数据范围很小,暴力kruscal即可. #include<cstdio> #include<algorithm> using namespace std; ]; bool operator < (const Edge &a,const Edge &b){return a.w<b.w;} ],rank[],tot; ;i<=n;i++)fa[i]=i;} int f…
题意:有M只猴子,他们的最大跳跃距离为Ai.树林中有N棵树露出了水面,给出了它们的坐标.问有多少只猴子能在这个地区露出水面的所有树冠上觅食. 解法:由于要尽量多的猴子能到达所有树冠,便用Kruskal求一次MST最小生成树,也就得到了最大边最小的最小瓶颈生成树.在用这个最大边权计算合法的猴子树. P.S.由于没有那些一下子输入几十万的数据,所以读优和不读优差别不大. 1 #include<cstdio> 2 #include<cstdlib> 3 #include<cstri…
题意:求解最小生成树,以及最小瓶颈生成树上的瓶颈边. 思路:只是求最小生成树即可.瓶颈边就是生成树上权值最大的那条边. //#include <bits/stdc++.h> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #define INF 0x7f7f7f7f #define pii pair<int,int> #defin…
题目大意:给出一个无向边,非常多询问,问x,y两地之间的最长路最短是多少. 思路:乍一看好像是二分啊. 的确这个题二分能够做.可是时间会慢非常多,有的题直接就T掉(NOIP2013货车运输). 事实上这个题的模型就是最小瓶颈路模型. 解法就是把无向图变成一个最小生成树,然后两点之间的最长路就是满足题意的答案. CODE: #include <cstdio> #include <cstring> #include <iostream> #include <algor…
Network Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 14021   Accepted: 5484   Special Judge Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the c…
Network Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 14103   Accepted: 5528   Special Judge Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the c…
Network Time Limit: 1000MS Memory Limit: 30000K Total Submissions: Accepted: Special Judge Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can…