# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
585990 | serize | 슈퍼트리 잇기 (IOI20_supertrees) | C++17 | 218 ms | 26004 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "supertrees.h"
#include<bits/stdc++.h>
using namespace std;
const int MAX = 1002;
int link[MAX];
inline int seek(int x){
if(x == link[x]) return x;
return link[x] = seek(link[x]);
}
int construct(std::vector<std::vector<int>> p) {
int n = p.size();
std::vector<std::vector<int>> answer;
for(int i = 0; i < n; i++) link[i] = i;
int f = 0;
for(auto i: p){
int a = seek(f);
for(int j = 0; j < n; j++){
if(i[j] == 1){
int b = seek(j);
link[b] = a;
}
}
f++;
}
# | 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... |