How to make an Adjacency list and how to print it for graph using STL?

后端 未结 0 577
闹比i
闹比i 2021-01-25 03:35
vectorAdj[V+1];
for(int i=1;i<=E;i++)
    {
        int u,v;
        cin>>u>>v;
        Adj[u].push_back(v);
        Adj[v].push_back(u);
    }         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题