# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
568415 | shahriarkhan | Sirni (COCI17_sirni) | C++14 | 595 ms | 409832 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 ;
const int MX = 1e7 + 5 ;
int nex[MX] , vis[MX] ;
vector<pair<int,int> > val[MX] ;
struct dsu
{
vector<int> sz , par ;
void init(int n)
{
sz = vector<int> (n+2,0) ;
par = vector<int> (n+2,0) ;
for(int i = 1 ; i <= n ; ++i)
{
par[i] = i , sz[i] = 1 ;
}
}
int find_root(int a)
{
if(par[a]==a) return a ;
return par[a] = find_root(par[a]) ;
}
int union_edge(int u , int v)
{
int root_u = find_root(u) , root_v = find_root(v) ;
if(root_u==root_v) return 0 ;
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... |
# | 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... |