# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
712440 | study | timeismoney (balkan11_timeismoney) | C++17 | 82 ms | 596 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>
#define int long long
using namespace std;
const int N = 201, nbIter = 10000,inf = sqrt(LLONG_MAX/2);
int comp[N],siz[N],t[N],c[N],x[N],y[N];
int fin1=inf,fin2=inf;
vector<pair<int,int>> res;
int getComp(int node){
if (comp[node] != node) comp[node] = getComp(comp[node]);
return comp[node];
}
bool merge(int a, int b){
a = getComp(a);
b = getComp(b);
if (a != b){
if (siz[a] < siz[b]) swap(a,b);
siz[a] += siz[b];
comp[b] = a;
return true;
}
return false;
}
int32_t main(){
ios::sync_with_stdio(0);
cin.tie(0);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |