Submission #558460

#TimeUsernameProblemLanguageResultExecution timeMemory
558460heavylightdecompGame (IOI14_game)C++14
0 / 100
1 ms304 KiB
#include<bits/stdc++.h> using namespace std; int par[1505], ccnt; int find(int x) { if(x==par[x])return x;else return par[x]=find(par[x]); } void merge(int a, int b) { a = find(a), b = find(b); if(a==b)return; par[a]=b; ccnt--;} void initialize(int n){ for(int i = 1; i <= n; i++) par[i] = i; ccnt = n; } int hasEdge(int u, int v) {if(ccnt==2)return 0;else {merge(u,v); return 1;}}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...