Table of Contents
Edit on GithubICPC 2019 Asia Danang Regional - Easy Query
Author: Benjamin Qi
This section is not complete.
Feel free to file a request to complete this using the "Contact Us" button.
The first step is to determine and for each query with a Wavelet tree. Once we have these values, we can answer the queries in decreasing order of with a segment tree.
Solution
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!