Getting an error in one of the test cases

Code link:-https://ide.geeksforgeeks.org/nKCuBeZtPU
Ques:-N meetings in a room using greddy approach

Please help me out

Test case:-
Input:-
6
1 3 0 5 8 5
2 4 6 7 9 9

Its Correct output is:
1 2 4 5

And Your Code’s output is:
1

@manikjindal49 share the link of the question.

Ques link:-https://practice.geeksforgeeks.org/problems/n-meetings-in-one-room-1587115620

Please help me out i havealready given the question link

@manikjindal49 in remove code
for(i=0;i<vect.size();i++){
cout<<vect[i]<<endl;
}
by
for(i=0;i<vect.size();i++){
cout<<vect[i]<<" ";
}

The first test case where your code failed: Input: 28 48 19 83 8 85 83 74 93 20 80 27 9 19 42 12 47 49 51 13 44 47 21 31 80 84 7 5 93 116 107 119 33 108 113 114 100 77 99 50 32 122 78 14 66 56 80 56 130 119 23 63 100 126 18 54 129 Its Correct output is: 15 22 11 18 8 And Your Code’s output is: 15 22 11 18 10 Failing on this testcase

@manikjindal49 try to use structure instead of using pair.

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.