# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
749215 | SanguineChameleon | Sequence (APIO23_sequence) | C++17 | 1039 ms | 166776 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 "sequence.h"
#include <bits/stdc++.h>
using namespace std;
struct node {
int mi, mx, lazy;
node(): mi(0), mx(0), lazy(0) {};
node(int _mi, int _mx): mi(_mi), mx(_mx), lazy(0) {};
};
const int maxn = 5e5 + 20;
int a[maxn];
vector<int> pos[maxn];
vector<int> pref[maxn][2];
vector<int> suf[maxn][2];
node tree[maxn * 4];
int n;
node merge(node L, node R) {
return node(min(L.mi, R.mi), max(L.mx, R.mx));
}
void build(int id, int lt, int rt) {
if (lt == rt) {
tree[id] = node(lt, lt);
return;
}
int mt = (lt + rt) / 2;
# | 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... |