Movie Festival Queries Problem

Правка en1, от -grace-, 2020-11-09 17:23:54

Hello everyone, I am having a problem in solving this problem from CSES problem set. I could not find any explanation for this problem.

I solved the "Movie Festival" problem which is easier version of this one by simply sorting the intervals by end time and then iterating over all the intervals and comparing begin time of each interval with previous interval's end. But that approach will give O(n^2) in this problem.

I was thinking of applyng Mo's to use the same approach but could not proceed.

Any help would be appreciated. Thanks and keep coding!!


  Rev. Язык Кто Когда Δ Комментарий
en1 Английский -grace- 2020-11-09 17:23:54 637 Initial revision (published)