摘要:
链式前向心 int add(int next,int v,int w){ e[++cnt].v=v; e[cnt].w=w; e[cnt].next=head[next]; head[next]=cnt; } struct mp{ int v; int next; int w; }e[2000000 阅读全文
摘要:
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<queue> using namespace std; #define INF 0x3f3f3f int cnt=0,head[INF 阅读全文