Hello, I'm trying to solve the problem movie festival II on cses problemset.
This is my code
It gives AC on 9 cases and WA on 4.
This is success code from USACO Guide forum.
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?