静态邻接表的建立

来源:互联网 发布:unity射击游戏源码 编辑:程序博客网 时间:2024/05/16 06:20
struct edge{    int end,next;}e[1000];int head[1000],cnt=0;void add(int start,int end){//头插法,单向    e[cnt]={end,head[start]};    head[start]=cnt;//记录下标    cnt++;}
原创粉丝点击