# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
350653 | Fischer | Jakarta Skyscrapers (APIO15_skyscraper) | C++14 | 291 ms | 79724 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e4 + 10;
set<int> pos[maxn];
vector<pair<int, int>> g[maxn];
using ll = long long;
ll d[maxn];
ll dijkstra(int src, int snk) {
memset(d, 1, sizeof d);
d[src] = 0;
using pii = pair<ll, int>;
priority_queue<pii, vector<pii>, greater<pii>> Q;
Q.push({0, src});
while (!Q.empty()) {
auto q = Q.top(); Q.pop();
if (q.second == snk) return q.first;
if (q.first != d[q.second]) continue;
for (auto e : g[q.second]) {
ll temp = q.first + e.second;
if (temp < d[e.first]) {
d[e.first] = temp;
Q.push({temp, e.first});
}
}
}
return -1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |