제출 #746047

#제출 시각아이디문제언어결과실행 시간메모리
746047vjudge1Cities (BOI16_cities)C++17
0 / 100
1 ms212 KiB
#include <bits/stdc++.h>
using namespace std;


vector<vector<pair<int, int>>> g;
vector<int>dijkstra(int n, int node){
    vector<int> d(n, INT_MAX);
    priority_queue<pair<int, int>> pq;
    pq.push({0, node});
        d[node] = 0;
    while(!pq.empty()){
        int v = pq.top().second, d_v = -1 * pq.top().first;
        pq.pop();
        if(d[v] != d_v){
            continue;
        }
        for(auto edge : g[v]){
            if(d[edge.first] > d[v] + edge.second){
                d[edge.first] = d[v] + edge.second;
                pq.push({-1 * d[edge.first], edge.first});
            }
        }
    }
    return d;
}


int main() {
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...