Submission #712440

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7124402023-03-18 19:28:24studytimeismoney (balkan11_timeismoney)C++17
5 / 100
82 ms596 KiB
#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);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...