Comments

The priority_queue does not allow you to change the values inside (because it might change the order), so it only returns a const reference with .top() and you have to pop and then push the elements again.

To fix it, you could e.g. use vll* or shared_ptr<vll> inside your queue, which is cheap to copy.

I think another comment said that having a space after the "Case #x: " gives a wrong answer.

Is there any tricky edge case for D? I did a binary search on the rotation angle and the small was accepted. But large is rejected, and the new interface is useless for figuring out what's wrong. :/

Also, can anyone spot the error in this on for A-large? https://pastebin.com/bNZVK765

Just go to contests tab and click on "enter" instead of "virtual participation" and you can submit all the problems in practice mode. (Though you may have to wait until the virtual contest is over before you can do that :p )