This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/4_Plat/Plat_1DRQ.md

44 lines
1.3 KiB
Markdown
Raw Normal View History

2020-06-04 02:09:42 +00:00
---
slug: /plat/1DRQ
title: "Platinum - 1D Range Queries"
author: Benjamin Qi
---
# Platinum - 1D Range Queries
Author: Benjamin Qi
## Static Range Queries
### Range Minimum Query
* Tutorial
* [Wikipedia](https://en.wikipedia.org/wiki/Range_minimum_query)
* (add)
### General Static Range Queries
* Static range queries in $O(1)$ time and $O(N\log N)$ preprocessing for any associative operation?
* (add)
## Segment Tree
Author: Benjamin Qi
2020-06-03 14:17:07 +00:00
This data structure allows you to do point update and range query in $O(\log N)$ time each for any associative operation.
* Tutorial
* CPH 9.3
* [CSAcademy Tutorial](https://csacademy.com/lesson/segment_trees/)
* [cp-algorithms](https://cp-algorithms.com/data_structures/segment_tree.html)
* [Codeforces Tutorial](http://codeforces.com/blog/entry/18051)
* [Slides from CPC.3](https://github.com/SuprDewd/T-414-AFLV/tree/master/03_data_structures)
2020-06-04 02:09:42 +00:00
### Practice Problems
2020-06-03 14:17:07 +00:00
* [USACO Springboards](http://www.usaco.org/index.php?page=viewproblem2&cpid=995)
* can use segment tree with min query in place of the map mentioned in analysis
* [POI Cards](https://szkopul.edu.pl/problemset/problem/qpsk3ygf8MU7D_1Es0oc_xd8/site/?key=statement) [](81)
* [Counting Haybales (USACO Plat)](http://www.usaco.org/index.php?page=viewproblem2&cpid=578)
* Lazy Updates