# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99073 | Akashi | Toll (APIO13_toll) | C++14 | 2005 ms | 20860 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 <bits/stdc++.h>
using namespace std;
struct edge{
int x, y, k, i;
bool operator < (const edge &aux)const{
if(k != aux.k) return k < aux.k;
return i < aux.i;
}
};
struct dsu{
int tt[100005], RG[100005];
void ini(int n){
for(int i = 1; i <= n ; ++i)
tt[i] = i, RG[i] = 1;
}
inline int Find(int x){
int R = x;
while(R != tt[R]) R = tt[R];
while(x != tt[x]){
int aux = tt[x];
tt[x] = R; x = aux;
}
return R;
}
inline void Union(int x, int y){
if(RG[x] > RG[y]) tt[y] = x;
else if(RG[x] < RG[y]) tt[x] = y;
else{
Compilation message (stderr)
# | 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... |