# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
464474 | TheScrasse | Putovanje (COCI20_putovanje) | C++17 | 143 ms | 30544 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;
#define nl "\n"
#define nf endl
#define ll long long
#define pb push_back
#define _ << ' ' <<
#define INF (ll)1e18
#define mod 998244353
#define maxn 200010
ll i, i1, j, k, k1, t, n, m, res, flag[10], a, b;
ll w1, w2, wu[maxn][2], pr[maxn], dp[maxn];
bool vis[maxn];
vector<array<ll, 3>> adj[maxn];
vector<ll> qdg[maxn];
ll find(ll x) {
if (pr[x] == x) return x;
return pr[x] = find(pr[x]);
}
void onion(ll a, ll b) { // (a, b) = (high, low)
a = find(a); b = find(b);
if (a == b) return;
pr[b] = a;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |