void dijikstra()
{
memset(dist,0x3f,sizeof dist);
priority_queue<PII, vector<PII>, greater<PII>> heap;
heap.push({0,1});
dist[1] = 0;
while(heap.size())
{
auto t = q.top(); q.pop();
int d = t.x, ver = t.y;
if(st[ver] == true) continue;
st[ver] = true;
for(int i = h[ver]; i != -1; i=ne[i])
{
int j = e[i];
if(dist[j] > d + w[i])
{
dist[j] = d + w[i];
heap.push({dist[j],j});
}
}
}
}