临接表存图

来源:互联网 发布:mysql front 5.3 注册 编辑:程序博客网 时间:2024/06/03 10:20
struct edge{    int f,t,v;}l[maxn];void build(int f,int t,int v);{    l[++tot]=(edge){f,t,v};    next[tot]=first[f];//next[tot]:在tot号边之前加入的一条边    first[f]=tot;//first[f]:以f为起点连接的第一条边    return;}
0 0
原创粉丝点击