# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
32064 | imeimi2000 | Roller Coaster Railroad (IOI16_railroad) | C++14 | 416 ms | 48732 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 "railroad.h"
#include <algorithm>
using namespace std;
typedef long long llong;
typedef pair<int, int> pi;
int n;
vector<int> comp;
int bsearch(int x) {
int s = 0, e = comp.size() - 1, m;
while (s < e) {
m = (s + e) / 2;
if (comp[m] == x) return m;
if (comp[m] < x) s = m + 1;
else e = m - 1;
}
return s;
}
int degree[400000];
int group[400000];
int par[400000];
vector<int> edge[400000];
pi mst[400000];
void dfs(int x, int s) {
group[x] = s;
for (int i : edge[x]) {
if (group[i] > 0) continue;
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... |