# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1158787 | CodeLakVN | Regions (IOI09_regions) | C++20 | 74 ms | 31496 KiB |
#include <bits/stdc++.h>
using namespace std;
#define task "REGIONS"
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FOD(i, a, b) for (int i = (a); i >= (b); i--)
const int N = (int)2e5 + 5;
const int BLOCK = 450;
int numNode, numQuery, numRegions;
int region[N];
vector<int> adj[N];
int timer = 0;
int in[N], out[N];
void dfs(int u, int p) {
in[u] = ++timer;
for (int v : adj[u]) if (v != p)
dfs(v, u);
out[u] = timer;
}
vector<pair<int, int>> employee[N];
int counter[N], id[N];
int ans[BLOCK][25005];
void solve(int r1, int r2) {
int res = 0;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |