# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
662108 | fatemetmhr | Homework (CEOI22_homework) | C++17 | 193 ms | 149704 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.
// heiy ... ye rooze jadid ...
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) x.begin(), x.end()
#define pb push_back
#define fi first
#define se second
const int maxn5 = 2e6 + 10;
int l[maxn5], r[maxn5], sz[maxn5];
vector <int> adj[maxn5], av;
bool ty[maxn5];
void dfs(int v){
if(adj[v].empty()){
l[v] = r[v] = 1;
sz[v] = 1;
return;
}
int u = adj[v][0], w = adj[v][1];
dfs(u); dfs(w);
sz[v] = sz[u] + sz[w];
if(ty[v]){
int tmpl = sz[u] - r[u] + 1, tmpr = sz[u] - (l[u] - 1);
# | 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... |