vector> g[N]; vector dijkstra(int s, int t) { const long long inf = 1e18; priority_queue, vector>, greater>> q; vector d(n + 1, inf); vector vis(n + 1, 0); q.push({0, s}); d[s] = 0; while(!q.empty()) { auto x = q.top(); q.pop(); int u = x.second; if(vis[u]) continue; vis[u] = 1; for(auto y: g[u]) { int v = y.first; long long w = y.second; // relaxation code } } return d; }