Help in solving CSES Movie Festival II

Правка en2, от 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?

Теги cses_helpline, #cses_sorting, #cses_searching

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский vinayaka 2024-01-30 16:12:25 2
en1 Английский vinayaka 2024-01-30 16:11:51 2176 Initial revision (published)