# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1163145 | PieArmy | Divide and conquer (IZhO14_divide) | C++20 | 608 ms | 263244 KiB |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll inf=2e18+5;
struct Seg{
ll n,shift=0;
vector<ll>tree,lazy,left_child;
int add(){
tree.push_back(-inf);
lazy.push_back(0);
left_child.push_back(-1);
tree.push_back(-inf);
lazy.push_back(0);
left_child.push_back(-1);
return tree.size()-2;
}
int lef(int node){
if(left_child[node]==-1)left_child[node]=add();
return left_child[node];
}
void init(ll N){
n=N;
tree.push_back(-inf);
lazy.push_back(0);
left_child.push_back(-1);
}
void push(int node,ll left,ll right){
if(lazy[node]==0)return;
tree[node]+=lazy[node];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |