int dist[MAXN];bool vis[MAXN];priority_queue>dd;void dij(){ memset(vis,0,sizeof(vis)); memset(dist,0x7f,sizeof(dist)); dist[1]=0; dd.push(make_pair(0,1)); while(!dd.empty()){ int ltop=dd.top().second;dd.pop();// cout< < =dist[bl[i].to])continue; dist[bl[i].to]=base+bl[i].w; dd.push(make_pair(-dist[bl[i].to],bl[i].to)); } }}