# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
578566 | Jarif_Rahman | Stranded Far From Home (BOI22_island) | C++17 | 164 ms | 26796 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
void merge_vector(vector<int> &a, vector<int> &b){
if(b.size() > a.size()) swap(a, b);
while(!b.empty()) a.pb(b.back()), b.pop_back();
}
struct rechability_tree{
int n;
vector<int> p;
vector<ll> s, sum;
vector<vector<int>> sth;
rechability_tree(int _n){
n = _n;
p.assign(n, -1);
s.assign(n, 0);
sum.assign(n, 0);
sth.assign(n, {});
for(int i = 0; i < n; i++) p[i] = i;
for(int i = 0; i < n; i++) sth[i].pb(i);
}
int get(int nd){
if(p[nd] != nd) p[nd] = get(p[nd]);
return p[nd];
# | 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... |