title: how to print the adjacency list from my vector
body: <p>i just practicing graphs...taking input of adjacency list...but cannot print it out...help please...</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include&lt;vector&gt;
  #include&lt;stdio.h&gt;
  using namespace std;
  #define MAX 10000//maximum node
  vector&lt;int &gt;edges[MAX];
  vector&lt;int&gt;cost[MAX];
  int main()
  {
      int n,e,i;
      scanf("%d%d",&amp;n,&amp;e);
      for(int i=1;i&lt;=e;i++)
      {
          int x,y;
          scanf("%d%d",&amp;x,&amp;y);
          edges[x].push_back(y);
          cost[x].push_back(1);
  
      }
  
      return 0;
  }
  </code></pre>