Getting wrong ans in the hotel visit problem

Here is my solution:

Hey @tasfikrahman007
2 changes :

  1. Make ull long long because x and y can be negative

#define ull long long

  1. Declare priority queue of ull instead of int

priority_queue max_heap;

If this resolves your query then please mark it as resolved :slight_smile: