![]() |
Weekly Problems #04 |
Pedro Ribeiro - DCC/FCUP |
This is one of 11 weekly problem sets. Each one is worth 10% of the grade of the "Submitted Implementation" evaluation criteria.
6 proposed problems:
- This is an almost direct problem that you can solve with static segment trees or sqrt decomposition
- You just need to take care to save on each range both the maximum and its number of occurrences
- Merging two ranges is easy, right?
- Dynamic range queries with less standard "merge" operation
- What values do you need to store to make the merge of two ranges?
- How to quickly find the hotel to put the next group of tourists?
- Can you binary search the answer, combined with range querying?
Can you think on how to take advantage of offline range querying?
- Your chance to implement direct 2D dynamic range queries
- Can you make a 2D segment tree with a seg tree inside a seg tree? 🙃
- Use a segment tree + range updates with lazy propagation
About the delivery:
Pedro Ribeiro - DCC/FCUP | Last update: