CSES — Hotel Queries

Revision en2, by __abs, 2022-12-11 11:23:49

Question. I understand how to solve this using Segment Trees.

I saw this solution by pikmike.

Copied here

Can someone explain how this works?

Tags cses, doubt, range query

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English __abs 2022-12-11 11:23:49 55
en1 English __abs 2022-12-11 11:23:06 628 Initial revision (published)