Submission #340728

#TimeUsernameProblemLanguageResultExecution timeMemory
340728nandonathanielGame (IOI14_game)C++14
0 / 100
1 ms364 KiB
#include "game.h" #include "bits/stdc++.h" using namespace std; int par[1505]; int find(int x){ if(par[x]==x)return x; return par[x]=find(par[x]); } void join(int a,int b){ par[find(a)]=find(b); } void initialize(int n) { for(int i=0;i<n;i++)par[i]=i; } int hasEdge(int u, int v) { if(find(u)!=find(v)){ join(u,v); return 1; } else return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...