# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
788831 | Ozy | Stranded Far From Home (BOI22_island) | C++17 | 195 ms | 41332 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 <iostream>
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define debug(a) cout << #a << " = " << a << endl
#define debugsl(a) cout << #a << " = " << a << ", "
#define rep(i,a,b) for(int i = (a); i<=(b); i++)
#define repa(i,a,b) for(int i = (a); i>=(b); i--)
#define pll pair<lli,lli>
#define MAX 200000
//para el vector de orden
#define id second
lli n,m,a,b,total;
lli arr[MAX+2],raiz[MAX+2],uf[MAX+2],sum[MAX+2],res[MAX+2];
vector<lli> aristas[MAX+2],n_arbol[MAX+2];
vector<pll> orden;
lli sube(lli pos) {
//debugsl(pos);
//debug(uf[pos]);
if (uf[pos] == pos) return pos;
uf[pos] = sube(uf[pos]);
return uf[pos];
}
void dfs(lli pos) {
res[pos] = 1;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |