# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
827457 | WLZ | 늑대인간 (IOI18_werewolf) | C++17 | 722 ms | 92076 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 "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
struct query {
int from, to, l, r, idx;
};
int n, m, q, dfs_cnt;
vector< vector<int> > g, g2;
vector<query> queries;
vector<int> ans, p, ord_l, ord_r;
vector< pair<int, int> > range;
int root(int u) {
if (p[u] == -1) return u;
return p[u] = root(p[u]);
}
int connect(int u, int v) {
u = root(u); v = root(v);
if (u == v) return u;
p[v] = p[u] = (int) p.size();
p.push_back(-1);
g2.push_back({u, v});
return (int) p.size() - 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |