# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
302142 | TMJN | Simurgh (IOI17_simurgh) | C++17 | 356 ms | 1792 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "simurgh.h"
#include <bits/stdc++.h>
using namespace std;
int N,M,T[500],tmpval[30000];
bool B[30000],checked[30000];
vector<int>res,tree;
static int par(int x){
if(T[x]==x)return x;
return T[x]=par(T[x]);
}
static bool uni(int x,int y){
x=par(x);
y=par(y);
if(x==y)return false;
T[x]=y;
return true;
}
vector<int>find_roads(int n,vector<int>u,vector<int>v){
N=n;
M=u.size();
res.clear();
tree.clear();
for(int i=0;i<N;i++){
T[i]=i;
}
for(int i=0;i<M;i++){
# | 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... |