摘要:
上一篇恰好也是对图论的理解,所以这次解释比较比较少,如果有什么不太懂得地方,可以参考上面的,也可以留言,我会尽最大努力解释:View Code # include<stdio.h> # include<stdlib.h># include<string.h># include<math.h>struct node { int num1,num2; ///代表庄 int cost; ///代表庄之间的维修费用};node count[10000];int flag[100];int cmp(const void *a,const void *b){ 阅读全文
摘要:
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1162 View Code 1 # include<stdio.h> ///大部分与上几个理解有相似之处,我把不同的地方标注一下,便于理解 2 # include<stdlib.h> 3 # include<string.h> 4 # include<math.h> 5 double x[5000],y[5000];///存的是两个点的x,y左标 6 int flag[5000]; 7 struct node 8 { 9 int num1,num2; 阅读全文