# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
409981 | MohamedAhmed04 | 자매 도시 (APIO20_swap) | C++14 | 558 ms | 63528 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "swap.h"
//#include "grader.cpp"
using namespace std ;
const int inf = 2e9 ;
const int MAX = 1e5 + 10 ;
int par[MAX] , sz[MAX] , cyc[MAX] ;
vector<int>comp[MAX] ;
int n , m ;
void Init()
{
for(int i = 1 ; i <= n ; ++i)
cyc[i] = inf , comp[i].push_back(i) , par[i] = i , sz[i] = 1 ;
}
int root(int node)
{
if(par[node] == node)
return node ;
return (par[node] = root(par[node])) ;
}
void Union(int x , int y , int z)
{
int a = root(x) ;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |