链式前向星模板

#include<bits/stdc++.h>
using namespace std;
typedef struct w_W{
    int eend;
    int weight;
    int next;
}miao;
miao x[100010];  
int head[100010]; 
int cnt=0;
void add(int s,int e,int w){
    x[cnt].eend=e;
    x[cnt].weight=w;
    x[cnt].next=head[s];
    head[s]=cnt++;
}
int main()
{
    for(int i=head[start];i!=-1;i=x[i].next){
        
    }
    return 0;
}

 

posted @ 2019-01-15 10:43  快乐的黄鳝  阅读(106)  评论(0)    收藏  举报