다익스트라
const int INF = 1000000000;int N, D, C;vector graph[10002];int dist[10002];int a, b, c; vector path[10002];priority_queue > pq; for (int i = 1; i > pq;pq.push({ 0, C });dist[C] = 0;while (!pq.empty()){ int cost = -pq.top().first; int cur = pq.top().second; pq.pop(); if (dist[cur] cost + nCost) { dist[next] = cost + nCost; pq.push(make_pair(-dist[next], next)); } }}