# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
206919 | savacska | Olympic Bus (JOI20_ho_t4) | C++14 | 144 ms | 2936 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>
#define pb push_back
#define mp make_pair
#define x first
#define y second
using namespace std;
typedef long long ll;
const ll INF = (ll) 1e18;
vector <pair <int, int> > g[205], rev[205];
ll start1[205], finish1[205], start2[205], finish2[205], len[50005], cost[50005];
ll dist[205];
pair <int, int> back[205], forw[205], rebr[50005];
bool used[205], sf[50005], fs[50005];
void dijkstra(int n, int start, ll dist[], pair <int, int> parent[], vector <pair <int, int> > g[])
{
for (int i = 1; i <= n; i++) dist[i] = INF, used[i] = false, parent[i] = mp(0, 0);
dist[start] = 0;
for (int rep = 1; rep <= n; rep++)
{
int v = -1;
for (int i = 1; i <= n; i++)
if (!used[i] && (v == -1 || dist[v] > dist[i])) v = i;
if (dist[v] == INF) break;
used[v] = true;
# | 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... |