# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
73469 | yusufake | Zalmoxis (BOI18_zalmoxis) | C++98 | 603 ms | 104492 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 _ int v, int tl, int tr, int l, int r
#define tm (tl+tr >> 1)
#define sol v+v,tl,tm,l,r
#define sag v+v+1,tm+1,tr,l,r
#define pb push_back
#define mp make_pair
#define st first
#define nd second
#define pp pair<int,int>
const int N = 1e6 + 6;
vector < int > V[N],U[N];
int ata[N],sz[N],H[N],A[N],B[N],n,k,i,j;
int find(int x){
return ata[x] == x ? x : ata[x] = find(ata[x]);
}
void f(int x, int y){
x = find(x);
y = find(y);
if(x == y || A[x] != A[y]) return;
if(x < y) swap(x,y);
ata[y] = x;
sz[x] += sz[y];
}
void g(int x){
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |