Submission #963171

#TimeUsernameProblemLanguageResultExecution timeMemory
963171MuntherCarrotGame (IOI14_game)C++14
0 / 100
1 ms444 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; const int MAXN = 1505; int fth[MAXN]; int find(int u){ return u == fth[u] ? u : fth[u] = find(fth[u]); } void merge(int u, int v){ u = find(u); v = find(v); fth[v] = u; } void initialize(int n){ iota(fth, fth + MAXN, 0); } int hasEdge(int u, int v){ if(find(u) == find(v)){ return 0; } merge(u, v); return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...