Help in CSES Salary Queries.

Revision en1, by alyosha, 2025-05-21 18:44:28

Hello, I was solving Salary Queries in CSES. I coded a BIT solution with complexity O(nlog^2(x)) solution but it doesn't pass all the testcases as it takes approx 3.5 seconds to run. Here's the link to the code https://cses.fi/paste/af0c566bad71c1a7c62bff/ . I don't want to use pre-code data-structures as I want to practice implemtation as well. All the solution i found on the internet contains unordered_set already implemented. Any suggestions are welcome.

Thanks

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English alyosha 2025-05-21 18:44:28 499 Initial revision (published)