# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
603575 | SeDunion | Split the Attractions (IOI19_split) | C++17 | 100 ms | 20336 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<algorithm>
#include<iostream>
#include<vector>
#include<assert.h>
using namespace std;
const int N = 2e5 + 123;
vector<int>g[N];
int used[N];
int n, a, b, c;
vector<int>vec, ans;
int av = -1, bv = -1;
int tin[N], tout[N], timer, sz[N];
void dfs(int v) {
used[v] = 1;
sz[v] = 1;
tin[v] = timer++;
for (int to : g[v]) if (!used[to]) {
dfs(to);
sz[v] += sz[to];
if (sz[to] >= a && n - sz[to] >= b) {
av = to, bv = v;
# | 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... |