# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
12259 | progressive | 수족관 3 (KOI13_aqua3) | C++98 | 88 ms | 11632 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<cstdio>
#define MAXN 150005
long long int cut[MAXN];
long long int height[MAXN];
struct Node
{
Node *parent;
Node *lchild;
Node *rchild;
long long int val;
long long int lazym;
int no;
Node *maxnode;
}node[MAXN];
void setlr(Node *n,long long int l,long long int r)
{
if(n->parent)
n->val=(n->parent->val)+(height[n->no]-height[n->parent->no])*(r-l);
else
n->val=height[n->no]*(r-l);
if(n->lchild)
setlr(n->lchild,l,cut[n->no]);
if(n->rchild)
setlr(n->rchild,cut[(n->no)+1],r);
return;
}
int main(){
int n,k;
scanf("%d",&n);
n=n/2-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... |