| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 776284 | benjaminkleyn | Game (IOI14_game) | C++17 | 1 ms | 212 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;
int e[1500];
int find(int u)
{
return e[u] < 0 ? u : e[u] = find(e[u]);
}
bool unite(int u, int v)
{
u = find(u), v = find(v);
if (u == v) return false;
if (e[u] > e[v]) swap(u, v);
e[u] += e[v], e[v] = u;
return true;
}
void initialize(int n)
{
for (int i = 0; i < n; i++)
e[i] = -1;
}
int hasEdge(int u, int v)
{
return unite(u, v);
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
