# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
202481 | Kastanda | Olympic Bus (JOI20_ho_t4) | C++11 | 367 ms | 1912 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.
// In The Name Of The Queen
#include<bits/stdc++.h>
using namespace std;
const int N = 209, M = 50004;
int n, m, U[M], V[M], C[M], DR[M], P[N];
bool MR[N], Mark[M];
long long F[N], D[N][N];
vector < int > Adj[N];
inline long long SSSP(int st, int fn, int j)
{
memset(F, 63, sizeof(F));
memset(MR, 0, sizeof(MR));
F[st] = 0;
for (int __ = 1; __ <= n; __ ++)
{
int v = -1;
for (int i = 1; i <= n; i ++)
if (!MR[i] && (v == -1 || F[v] > F[i]))
v = i;
MR[v] = 1;
for (int i : Adj[v])
if (i != j && F[V[i]] > F[v] + C[i])
F[V[i]] = F[v] + C[i];
if (v == V[j])
if (F[U[j]] > F[v] + C[j])
F[U[j]] = F[v] + C[j];
}
return (F[fn]);
}
inline long long Solve(int st, int fn)
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... |