# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
411679 | Dormi | Bread First Search (CCO21_day2problem2) | C++14 | 226 ms | 4992 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;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
template<typename T>
int sz(const T &a){return int(a.size());}
const int MN=2e5+1;
int n;
struct seg{
struct node{
int data,lazy;
node(){
data=0,lazy=0;
}
void apply(int a){
data+=a;
lazy+=a;
}
}t[2*MN];
void prop(int ind, int le, int ri){
int mid=(le+ri)/2;
int left=ind+1,right=ind+(mid-le+1)*2;
t[left].apply(t[ind].lazy),t[right].apply(t[ind].lazy);
t[ind].lazy=0;
}
void update(int ind, int le, int ri, int l, int r, int val){
if(l>ri||r<le||l>r)return;
if(le>=l&&ri<=r){
t[ind].apply(val);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |