# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
204069 | Kastanda | Commuter Pass (JOI18_commuter_pass) | C++11 | 405 ms | 30956 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>
#define x first
#define y second
using namespace std;
typedef long long ll;
const int N = 100005;
int n, m, st, fn, vs, ut, M[N], M2[N];
ll Mn = LLONG_MAX, dp[N];
vector < int > Ad[N], Adt[N];
vector < pair < int , int > > Adj[N];
priority_queue < pair < ll , int > > Pq;
vector < ll > Dst, Dvs, Dut;
vector < ll > SSSP(int v)
{
vector < ll > D(n + 1, (ll)(1e18));
D[v] = 0; Pq.push({0, v});
while (Pq.size())
{
ll d = - Pq.top().first;
v = Pq.top().second; Pq.pop();
if (d > D[v])
continue;
for (auto u : Adj[v])
if (D[u.x] > D[v] + u.y)
D[u.x] = D[v] + u.y, Pq.push({-D[u.x], u.x});
}
return (D);
}
void DFS(int v)
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... |