# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
843338 | pera | Colouring a rectangle (eJOI19_colouring) | C++17 | 407 ms | 74780 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;
#define int long long
const int N = 4e5;
vector<int> t(4 * N) , lz(4 * N);
void push(int u){
t[u * 2] += lz[u];
t[u * 2 + 1] += lz[u];
lz[u * 2] += lz[u];
lz[u * 2 + 1] += lz[u];
lz[u] = 0;
}
void make_new(int n){
for(int i = 0;i <= 4 * n;i ++){
t[i] = lz[i] = 0;
}
}
void pos_assign(int u , int l , int r , int pos , int val){
if(l == r){
t[u] = val;
return;
}
push(u);
int m = (l + r) / 2;
if(pos <= m) pos_assign(u * 2 , l , m , pos , val);
else pos_assign(u * 2 + 1 , m + 1 , r , pos , val);
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |