# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
738865 | josanneo22 | 자매 도시 (APIO20_swap) | C++17 | 2061 ms | 18188 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
vector<int> par,sz,swappable,deg,has;
int total_groups;
void init(int n){
par.resize(n); sz.resize(n); swappable.resize(n); deg.resize(n);has.resize(n);
for(int i=0;i<n;i++){
par[i]=i;
sz[i]=1;
swappable[i]=0;
deg[i]=0;
has[i]=0;
}
}
int find(int x){
if(par[x]==x) return x;
else return par[x]=find(par[x]);
}
void sw(int x,int y){
swappable[x]=(swappable[x]&swappable[y]);
swappable[y]=(swappable[x]&swappable[y]);
has[x]|=has[y];
if(has[x]){
swappable[y]=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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |