우선순위큐

    [class4] (백준 1238) 파티

    알고리즘 다익스트라, 우선순위 큐 [문제 본문] 더보기 HTML 삽입 미리보기할 수 없는 소스 [푼 코드] #include #include #include #define INF 987654321 using namespace std; struct Road { int goal; int time; }; int N, M, X; vector v[1001]; int d[1001]; int Solved(int start, int goal) { priority_queue pq; for (int i = 1; i time goal]) { d[iter->goal] = time + iter->time; pq.push({ -(time + iter->time),iter->goal }); } } } return ..