# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
777764 | canadavid1 | Game (IOI14_game) | C++14 | 1077 ms | 2504 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> sz;
vector<int> pp;
vector<pair<int,int>> edge;
int find(int id)
{
if(pp[id] != id)
{
pp[id] = find(pp[id]);
}
return pp[id];
}
bool unite(int a,int b)
{
if(a==b) return false;
a = find(a);
b = find(b);
if (a==b) return false;
if(sz[a] < sz[b]) swap(a,b);
pp[b] = a;
sz[a] += sz[b];
return true;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |