#include <bits/stdc++.h>
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
// each corresponds with a segment
// for each segment, find left and right s.t. overlap
// i.e.
// sweep rightwards
// get maximum val in segtree
// for that segment, set it to i
// now we know the lb and rb
// range set range getmax
// now, say we have requriement Li < i < Ri
// this invalidates all queries with left bound from (Li, i] and rb [i, Ri)
// we can store this with segtree st[i] => minimum r required for l = i
// process requirements in increasing r
// use lazy range set
// range set point max
return 0;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |