# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
668161 | fatemetmhr | Stranded Far From Home (BOI22_island) | C++17 | 242 ms | 43836 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;
typedef long long ll;
#define all(x) x.begin(), x.end()
#define pb push_back
#define fi first
#define se second
const int maxn5 = 3e5 + 10;
ll s[maxn5], sum[maxn5];
int cmp[maxn5];
bool mark[maxn5], seen[maxn5];
vector <int> adj[maxn5], av[maxn5];
vector <pair<int, int>> ver;
void merge(int a, int b){
if(av[a].size() < av[b].size())
swap(a, b);
for(auto u : av[b]){
cmp[u] = a;
av[a].pb(u);
}
sum[a] += sum[b];
av[b].clear();
}
# | 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... |