i just started with it...Code:for(i=1;i<=m;i++) { cin>>u>>v>>c; G[u].push_back(pair<int,int>(v,c) ); }
my scenario is user gives another two i/p say a ,b
i have to check wat are all adjacent to a and reach b sumtime ..(at the end return sums of c in the path).. how do i do it using vector and pairs....
a sample code or extension of this code would be helpful