Please read the new rule regarding the restriction on the use of AI tools. ×

Help in solving CSES Movie Festival II

Revision en2, by vinayaka, 2024-01-30 16:12:25

Hello, I'm trying to solve the problem movie festival II on cses problemset.

This is my code

My code

It gives AC on 9 cases and WA on 4.

This is success code from USACO Guide forum.

Success code

What am I doing wrong? Isn't set.upper_bound comparison same and pq.top in mine? Can anyone help in writing success PQ code?

Tags cses_helpline, #cses_sorting, #cses_searching

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English vinayaka 2024-01-30 16:12:25 2
en1 English vinayaka 2024-01-30 16:11:51 2176 Initial revision (published)