vinayaka's blog

By vinayaka, history, 9 months ago, In English

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?

  • Vote: I like it
  • +1
  • Vote: I do not like it