제출 #340728

#제출 시각아이디문제언어결과실행 시간메모리
340728nandonathaniel게임 (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...