# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
241160 | gs13105 | 간선 파괴 (GA5_destroy) | C++17 | 2531 ms | 25036 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 <bits/stdc++.h>
using namespace std;
int par[710];
int root(int x)
{
return !par[x] ? x : (par[x] = root(par[x]));
}
bool merge(int x, int y)
{
x = root(x);
y = root(y);
if(x == y)
return 0;
par[x] = y;
return 1;
}
pair<int, int> edg[150000];
vector<pair<int, int>> seg[270000];
void init(int x, int l, int r)
{
if(l == r)
{
auto [a, b] = edg[l];
par[a] = par[b] = 0;
assert(merge(a, b));
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |