# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
464419 | dannyboy20031204 | Papričice (COCI20_papricice) | C++17 | 290 ms | 26124 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 <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define double long double
using namespace std;
void db() {cerr << endl;}
template <typename T, typename ...U> void db(T a, U ...b) {
cerr << a << ' ', db(b...);
}
const int N = 2e5 + 1, inf = 1e9 + 1;
int n, ans = inf;
vector<int> g[N];
int sz[N];
multiset<int> s, s2;
void dfs1(int u, int p){
sz[u] = 1;
for (int i : g[u]){
if (i == p)
continue;
dfs1(i, u);
sz[u] += sz[i];
}
//db(u, sz[u]);
}
int f(int a, int b, int c){
return max({abs(a - b), abs(a - c), abs(b - c)});
}
void dfs(int u, int p){
auto it = s2.lower_bound((n + sz[u]) / 2);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |