# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
670831 | dattranxxx | Relay Marathon (NOI20_relaymarathon) | C++11 | 1330 ms | 133860 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
const int N = 1e5 + 5, inf = 1e16;
vector<pair<int, int>> adj[N];
int special[N];
int n, m, k;
priority_queue<pair<int, int>> q;
int dis[N], src[N];
pair<int, int> dijkstra(int s) {
memset(dis, 0x3f, sizeof(dis));
q.emplace(0, s); dis[s] = 0;
while (!q.empty()) {
int d, u; tie(d, u) = q.top(); q.pop();
if (-d != dis[u]) continue;
if (special[u]) return {dis[u], u};
for (auto& p : adj[u]) {
int v, w; tie(v, w) = p;
if (dis[u] + w < dis[v])
dis[v] = dis[u] + w, q.emplace(-dis[v], v);
}
}
return {inf, 0};
}
# | 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... |