# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
115621 | Mahdi_Jfri | Toll (APIO13_toll) | C++14 | 1735 ms | 21408 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;
#define ll long long
#define pb push_back
#define bit(a , b) (((a)>>(b))&1)
const int maxn = 3e5 + 200;
int from[maxn] , to[maxn] , w[maxn] , ind[maxn];
int par[maxn];
ll p[maxn] , sub[maxn];
bool mst[maxn] , in_all[maxn];
vector<int> adj[maxn];
int fn(int v)
{
return par[v] < 0? v : par[v] = fn(par[v]);
}
bool cn(int a , int b)
{
a = fn(a) , b = fn(b);
return a == b;
}
void merge(int a , int b)
# | 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... |