邻接表
无结构体
vector<int> vs[n]; //边
int vw[n]; //点权,下标对应顶点编号
int gw[n][n]; //边权
结构体
struct node{
int v;//到达顶点
int w;//边权
}
vector<node> vs[n]; //边,边权
int vw[n]; //点权,下标对应顶点编号
邻接矩阵
无结构体
int g[n][n]; //边
int vw[n]; //点权,下标对应顶点编号
int gw[n][n]; //边权