# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
679405 | kusssso | Commuter Pass (JOI18_commuter_pass) | C++17 | 0 ms | 0 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>
using namespace std;
using ll = long long;
#define int long long
const int N = 1e5 + 5;
const ll inf = 1e18;
typedef pair<int, ll> edge;
#define fi first
#define se second
struct Node {
ll fu;
int u;
bool hu, hv;
bool operator < (const Node& oth) const {
return fu > oth.fu;
}
};
int n, m;
int S, T, U, V;
ll f[N][2][2], ans;
vector<edge> g[N];
vector<int> pa[N];
vector<ll> du, dv, ds, dt;
vector<ll> Dij (int st) {
for (int i = 1; i <= n; i++) dag[i].clear();
vector<ll> d(n + 1, inf);
d[st] = 0;