# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
522156 | YuDabin | 약속장소 정하기 (GCJ12KOR_appointment) | C++14 | 2785 ms | 12596 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1e16;
int n, p, m;
vector<pair<int, int>> man;
vector<vector<pair<int, int>>> graph;
vector<int> ans;
void dijkstra(int i)
{
vector<int> dist(n+1, INF);
priority_queue<pair<int, int>> pq; pq.push({0, man[i].first});
while(!pq.empty())
{
int here = pq.top().second, cost = -pq.top().first; pq.pop();
if(dist[here] != INF) continue;
dist[here] = cost;
for(auto it : graph[here])
{
int there = it.first, ncost = cost + it.second * man[i].second;
if(dist[there] != INF) continue;
pq.push({-ncost, there});
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |