I am using a std::priority_queue to implement Dijkstra's algorithm:while(!Q.empty()){    u = Q.top().first;    Q.pop();    int size=G[u].size();    for(int i=0; i<size; i++)//tle    {        v = G[u][i].first;        w = G[u][i].second;        //cout<<u<< <<v<< <<w<<endl;        if(d[v] > d[u] + w)        {            d[v] = d[u] + w;            Q.push(pp(v,d[v]));        }    }}But I think it is a bit slow for competitive programming (\$O(e + v*v)\$).  How can I improve my implementation?
Optimizing implementation of Dijkstra
c++;algorithm;graph;queue