cpinitiative / usaco-guide

A free collection of curated, high-quality resources to take you from Bronze to Platinum and beyond.
https://usaco.guide
Other
1.61k stars 485 forks source link

New topic - Parallel Binary Search #3624

Open Muaath5 opened 1 year ago

Muaath5 commented 1 year ago

This should be probably in Gold or Platinium.

Usually you can use this techinique when you can do a single query in $O(n \cdot log_2(MaxAns))$, you can sweep through the array and prosess all the queries in a parallel way, So usually the total complexity is: $O((n + q) \cdot log_2(MaxAns))$

Problems:

Probably also add problem SZKOpul - Meteors, but I'm not sure about it.

Talha-Taki002 commented 1 year ago

For joining CPI team as a content writer, I am willing to write this content for my one of two pull requests requirement. Can you assign me?

bqi343 commented 1 year ago

This should be probably in Gold or Platinium.

Or maybe Advanced, given that I can't think of any USACO Gold or Platinum example problems for this.

Talha-Taki002 commented 1 year ago

@bqi343 I have added the first draft of parallel binary search module. If you can check it out and let me know where I fell short and maybe you can fix some issues