# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1134152 | PagodePaiva | Flight to the Ford (BOI22_communication) | C++20 | 155 ms | 31104 KiB |
#include<bits/stdc++.h>
#include"communication.h"
#define recieve receive
using namespace std;
struct Node{
Node *lf, *rf;
int val, lz;
Node(int v, int ll, int rr){
val = (rr-ll+1)*v;
lz = -1;
lf = rf = NULL;
}
void unlazy(int l, int r){
if(lz==-1) return;
val = lz*(r-l+1);
if(l != r){
int mid = (l+r)/2;
if(!lf) lf = new Node(1, l, mid);
if(!rf) rf = new Node(1, mid+1, r);
lf->lz = lz;
rf->lz = lz;
}
lz = -1;
}
void update(int l, int r, int tl, int tr, int v){
unlazy(tl, tr);
if(l > tr or tl > r) return;
if(l <= tl and tr <= r){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |