# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
203120 | ics0503 | Olympic Bus (JOI20_ho_t4) | C++17 | 832 ms | 7928 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<stdio.h>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
struct xy { long long x, y, z, ck, idx; };
vector<xy>edge[212], redge[212];
long long n, m, dist[4][212], bef[4][212], dep[4][212], rdist[4][212], u[51515], v[51515], c[51515];
void dijkstra(long long st, long long flag, long long dist[4][212], vector<xy> edge[212]) {
for (int i = 1; i <= n; i++)dist[flag][i] = 1e15;
dist[flag][st] = 0;
priority_queue<pair<long long , long long >>H;
H.push({0, st});
int dept = 0;
while (!H.empty()) {
auto g = H.top(); H.pop();
long long now = g.second;
if (dist[flag][now] != -g.first)continue;
dep[flag][now] = ++dept;
for (xy E : edge[now]) {
if (E.ck)continue;
long long nxt = E.x, c = E.y;
if (dist[flag][nxt] > dist[flag][now] + c) {
dist[flag][nxt] = dist[flag][now] + c;
H.push({ -dist[flag][nxt],nxt });
}
}
}
}
int main() {
Compilation message (stderr)
# | 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... |