摘要:需要注意,因为增加一个零点,最后总点数要加1;此模板的边和点都从0开始计数废话一句,厚积方能薄发啊。View Code #include<stdio.h>#include<stdlib.h>#include<math.h>#include<string.h>#define maxn 1005const int inf =1000000000;struct Edge{ int s,t; int cost;}edge[maxn*maxn];struct node{ int x,y,z;}a[maxn];int E,nv,ne;int pre[maxn
阅读全文