Not Frequent
0/9
Range Queries with Sweep Line
Authors: Benjamin Qi, Andi Qu
Solving 2D grid problems using 1D range queries.
Focus Problem – read through this problem before continuing!
Focus Problem – read through this problem before continuing!
Tutorial
This section is not complete.
Any help would be appreciated! Just submit a Pull Request on Github.
Solution - Intersection Points
This section is not complete.
Any help would be appreciated! Just submit a Pull Request on Github.
Solution - Springboards
This section is not complete.
Any help would be appreciated! Just submit a Pull Request on Github.
The problem boils down to having a data structure that supports the following operations:
- Add a pair .
- For any , query the minimum value of over all pairs satisfying .
The other module describes a simpler way of doing this, though it's probably more straightforward to do coordinate compression and use a min segtree. The latter approach is shown below.
/*** Description: 1D point update, range query where \texttt{comb} is* any associative operation. If $N=2^p$ then \texttt{seg[1]==query(0,N-1)}.* Time: O(\log N)* Source:* http://codeforces.com/blog/entry/18051* KACTL* Verification: SPOJ Fenwick*/
Problems
Status | Source | Problem Name | Difficulty | Tags | Solution | URL |
---|---|---|---|---|---|---|
HE | Easy | Show TagsPURS | ||||
Plat | Normal | Show TagsPURQ | External Sol | |||
CSES | Hard | Show TagsPURQ | View Solution | |||
IZhO | Hard | View Solution |
Relating to LIS:
Status | Source | Problem Name | Difficulty | Tags | Solution | URL |
---|---|---|---|---|---|---|
Balkan OI | Hard | Show TagsDP, PURS | External Sol | |||
COCI | Hard | Show TagsDP, PURS | External Sol | |||
Plat | Very Hard | Show TagsDP | External Sol |
Module Progress:
Join the USACO Forum!
Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!