Submission #654456

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6544562022-10-31 11:00:31ktkeremStranded Far From Home (BOI22_island)C++17
40 / 100
1099 ms48208 KiB
#include<bits/stdc++.h>
typedef long long ll;
typedef std::pair<ll , ll> llll;
#define fi first
#define sec second
#define all(x) x.begin() , x.end()
#define pb push_back
const ll ous = 2e5+7;
std::vector<llll> ar ;std::vector<ll> adj[ous] , nds(ous , 0) , par(ous) , sz(ous) , ans(ous , 1) , rar(ous) , kr(ous) , ant(ous);
ll n , m , o;
ll fin(ll x){
if(par[x] == x){
return x;
}
return par[x] = fin(par[x]);
}
void mrg(ll x , ll y){
x = fin(x);y = fin(y);
if(sz[y] > sz[x]){
std::swap(x , y);
}
if(x != y){
par[y] = x;
sz[x] += sz[y];
}
}
void dfs(ll crt){
o += rar[crt];
nds[crt] = 1;
for(auto j:adj[crt]){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...