# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
240879 | zoomswk | Split the Attractions (IOI19_split) | C++17 | 9 ms | 5120 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 "split.h"
#include <vector>
#include <algorithm>
using namespace std;
vector<int> way[100005];
int par[100005];
int sz[100005];
int dfs(int node, int p=-1){
if(sz[node] > 0) return 0;
par[node] = p;
sz[node] = 1;
for(int x : way[node]) sz[node] += dfs(x, node);
return sz[node];
}
int is_in[100005];
vector<int> whats_in;
vector<int> whats_in2;
void go(int node){
is_in[node] = 1;
whats_in.push_back(node);
for(int x : way[node]) if(par[x] == node) go(x);
return;
}
void go2(int node){
if(is_in[node]) return;
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... |