# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
953815 | MuntherCarrot | Global Warming (CEOI18_glo) | C++14 | 159 ms | 10376 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 ll long long
#define endl '\n'
#define all(x) x.begin(), x.end()
#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3f
const int MOD = 1e9 + 7;
template<typename T>
struct segTree{
vector<T> t;
int N;
segTree(int n) : N(1){
while(N < n) N <<= 1;
t.resize(N << 1);
}
segTree(const vector<T> &vec) : segTree(vec.size()){
for(int i = 0; i < (int)vec.size(); i++){
t[i + N] = vec[i];
}
for(int i = N - 1; i > 0; i--){
t[i] = max(t[i << 1], t[i << 1 | 1]);
}
}
void upd(int i, T val){
assert(i >= 0 && i < N);
i += N;
t[i] = t[i] + val;
while(i >>= 1){
# | 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... |