Coordinate compression and sweep line
- Stage
- 6
- Module
- M6.8
- Lessons
- 1
In this module
- Compress large coordinates into a dense rank map.
- Build a 2D difference array on a compressed grid weighted by real dimensions.
- Sweep over sorted events to compute coverage, not just a count.
- Solve rectangle and interval problems that span large coordinate ranges.
Before this module
Lessons
Practice
Try this on the judge. The link opens the problem on DMOJ.
- 2014 S4Tinted Glass Window (opens on DMOJ in a new tab) DMOJ
Find the total window area covered once several tinted panes overlap.