Dijkstras algorithm

Graph g;
int n,m;
cin>>n>>m;
for(int i=0;i<m;i++)
{
int a,b,r;
cin>>a>>b>>r;
g.addEdge(a,b,r);
}

this ll pass the test case. if this solves your doubt mark it as resolved :slight_smile: