# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
209012 | eriksuenderhauf | Olympic Bus (JOI20_ho_t4) | C++11 | 59 ms | 8236 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 sz(x) (int)(x).size()
#define trav(x, a) for (const auto& x: a)
#define pii pair<int,int>
#define st first
#define nd second
using namespace std;
typedef long long ll;
const int N = 5e4 + 5;
const ll inf = 0x1f1f1f1f1f1f1f1f;
vector<int> e[2][N], adj[N];
int U[N], V[N], C[N], D[N];
ll dp[2][2][N], dp2[2][205][205];
int n, m, par[2][2][N];
int mrk[2][2][N];
vector<int> path[2][2];
void solve(int s, int t, int i) {
priority_queue<pii,vector<pii>,greater<pii>> pq;
pq.push({0, s});
for (int j = 1; j <= n; j++)
dp[i][s>1][j] = inf;
dp[i][s>1][s] = 0;
while (!pq.empty()) {
auto c = pq.top(); pq.pop();
if (dp[i][s>1][c.nd] != c.st)
continue;
for (int j: e[i][c.nd]) {
int v = U[j]^V[j]^c.nd;
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... |