[HELP] WA in CSES Movie Festival II

Revision en2, by i_love_vim, 2020-09-16 15:38:07

Hello all,

I am trying to solve CSES movie festival II using the same logic for movie festival I. I am greedily assigning the movies to k people sorted by end times. But this is giving me WA on cases 5, 6, and 7. These cases have n = 200000, so I cannot work them out on paper to find out the problem in my logic. So request to please give me some test cases to help me find the mistake in my logic.

My code

Spoiler
Tags #cses, #greedy

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English i_love_vim 2020-09-16 15:38:07 10
en1 English i_love_vim 2020-09-16 15:37:00 1192 Initial revision (published)