/* 三个点的话 A--D--B | C dis(AD)=(AB+AC-BC)/2; 拓展到到n个点 每次去叶子节点,先去掉与A相连长度最小的. 将他们的长度加起来. */ #include<stdio.h> #define N 110 int ma[N][N]; int main() { int n,m,i,j,k,minn,f; while(scanf("%d",&n)!=EOF) { for(i=1;i<n;i++) for(j=i+1;j<=n;…
poj 1251 Jungle Roads (最小生成树) Link: http://poj.org/problem?id=1251 Jungle Roads Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 23507 Accepted: 11012 Description The Head Elder of the tropical island of Lagrishan has a problem. A b…
http://acm.hdu.edu.cn/showproblem.php?pid=1251 统计难题 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 21236 Accepted Submission(s): 9145 Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成…
1251. Cemetery Manager Time limit: 1.0 secondMemory limit: 64 MB There is a tradition at the USU championships to call the most hard-to-solve problems coffins. But to distribute coffins is also a very difficult problem. Consider a cemetery with place…