# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1163168 | PieArmy | Divide and conquer (IZhO14_divide) | C++20 | 359 ms | 327680 KiB |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll inf=2e18+5;
struct X{
ll tree=-inf,lazy=0;
X* lef=NULL;
X* rig=NULL;
};
struct Seg{
ll n,shift=0;
X root;
void init(ll N){
n=N;
}
void push(X &node,ll left,ll right){
if(node.lazy==0)return;
node.tree+=node.lazy;
if(left!=right){
if(!node.lef)node.lef=new X;
node.lef->lazy+=node.lazy;
if(!node.rig)node.rig=new X;
node.rig->lazy+=node.lazy;
}
node.lazy=0;
}
ll l,r,x;
void up(X &node,ll left=-inf,ll right=-inf){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |