# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
396856 | abdzag | Global Warming (CEOI18_glo) | C++17 | 1216 ms | 60712 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>
#define rep(i,a,b) for(int i=int(a);i<int(b);i++)
#define rrep(i,a,b) for(int i=int(a);i>int(b); i--);
#define all(v) v.begin(),v.end()
#define trav(a,v) for(auto&a:v)
using namespace std;
const long long inf = 1e15;
typedef long long ll;
struct MaxTree {
typedef ll T;
static constexpr T unit = -inf;
vector<T> s;
T f(T a, T b) {
return max(a, b);
}
ll n;
MaxTree(ll n = 0, T def = unit) : n(n), s(2 * n, def) {}
void update(ll pos, T val) {
for (s[pos += n] = val; pos /= 2;) {
s[pos] = f(s[2 * pos], s[2 * pos + 1]);
}
}
T query(ll l, ll r) {
T a = unit, b = unit;
if (l == r)return 0;
for (l += n, r += n; l < r; l /= 2, r /= 2) {
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... |