# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
390450 | blue | Railway (BOI17_railway) | C++17 | 237 ms | 22604 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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;
/*
For each deputy minister, a track is relevant if there is at least one neighborhood on either side.
If nodes are in DFS order, a deputy minister wants to build an edge if there is >=1 station inside its range and
>=1 station outside its range.
Locate smallest and largest DFS labels in a DM's set.
Mo's algorithm over DFS subtree ranges
*/
const int maxn = 1e5;
vector<int> edge[1+maxn];
vector<int> edgelabel[1+maxn];
vector<int> querylabel(1+maxn, 0);
vector<int> label(1+maxn, 0);
int ct = 0;
vector<int> subtree(1+maxn, 1);
int rt = 0;
void dfs(int u)
{
ct++;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |