Regarding a hacker block problem

sir there is a question in a in hacker block that I have done and I am getting a wrong output can you help
there is the problem
https://hack.codingblocks.com/app/practice/1/1451/problem
and my code

  1. you have to take input like this
    first value is for start time and second is for end time
for(int i=0;i<n;i++){

       cin>>srt[i];

       cin>>end[i];

   }
  1. also initialize plt with 0

  2. if(srt[i+1]<end[i]){
    plt++;
    }
    using this condition you will not get min no of party halls
    because some party halls may vaccant after some time
    also reuse them


its showing me test case fails can you check

if you sort both the arrays
sort(srt,srt+n);

sort(end,end+n);
then you lose the pairs of starting and ending time of meet

you have to store them in a vector of pairs and the sort

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.