# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
386413 | haojiandan | Worst Reporter 4 (JOI21_worst_reporter4) | C++14 | 1227 ms | 247020 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>
using namespace std;
template <typename T> void read(T &t) {
t=0; char ch=getchar(); int f=1;
while (ch<'0'||ch>'9') { if (ch=='-') f=-1; ch=getchar(); }
do { (t*=10)+=ch-'0'; ch=getchar(); } while ('0'<=ch&&ch<='9'); t*=f;
}
typedef long long ll;
const ll INF=1e18;
const int maxm=(1e7)+10;
const int maxn=(2e5)+10;
int n,fa[maxn];
int lsh[maxn],N,H[maxn],C[maxn];
vector<int> son[maxn];
int tot,ls[maxm],rs[maxm];
ll delta[maxn],ans,mx[maxm],fg[maxm],add[maxm];
int rt[maxn],row,rub[maxm];
void pushup(int root) {
mx[root]=max(mx[ls[root]],mx[rs[root]]);
}
void F(int &root) {
if (!root) {
if (row) root=rub[row],row--;
else root=++tot;
ls[root]=rs[root]=0;
mx[root]=add[root]=0,fg[root]=INF;
}
}
void putadd(int root,ll delta) {
if (fg[root]!=INF) fg[root]+=delta;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |