제출 #1108143

#제출 시각아이디문제언어결과실행 시간메모리
1108143Mingyuanz게임 (IOI14_game)C++14
0 / 100
1 ms336 KiB
int N,par[1551]; void initialize(int n){ N=n; for(int i=0; i<n; i++) par[i]=i; } int root(int u){ return par[u]=(u==par[u])?u:root(par[u]); } int join(int u,int v){ int a=root(u),b=root(v); if(a!=b){ par[a]=b; N--; } return a!=b; } int hasEdge(int u,int v){ if(N==2) return 0; return join(u,v); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...