# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1078832 | Halym2007 | Sequence (APIO23_sequence) | C++17 | 2066 ms | 68180 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>
#include "sequence.h"
using namespace std;
#define ll long long
#define sz size()
#define ff first
#define ss second
#define pb push_back
#define pii pair <int, int>
const int N = 5e5 + 5;
const int NN = N * 4;
int a[N], n;
vector <int> idx[N];
ll mx[NN], mn[NN], st[NN], gosh[NN], jogg;
void build (int ind, int l, int r) {
if (l == r) {
st[ind] = mn[ind] = mx[ind] = l;
return;
}
int mid = (l + r) / 2;
build (ind * 2, l, mid);
build (ind * 2 + 1, mid + 1, r);
mn[ind] = min (mn[ind * 2], mn[ind * 2 + 1]);
mx[ind] = max (mx[ind * 2], mx[ind * 2 + 1]);
}
void update (int ind, int l, int r, int x, int y, ll val) {
if (gosh[ind / 2]) {
gosh[ind] += gosh[ind / 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... |