WA after even writing same code of video solution

#include<bits/stdc++.h>
using namespace std;
bool AttendAll(vector<vector>& events){
sort(events.begin(), events.end());
int i = 1;
while(i < events.size()){
if(events[i][0] < events[i-1][1])
return false;
i++;
}
return true;
}
int main(){
int n;
cin>>n;
vector<vector> arr;

for(int i = 0; i < n; i++){
    int s,e;
    cin>>s>>e;
    vector<int>temp;
    temp.push_back(s);
    temp.push_back(e);
    arr.push_back(temp);
}
cout << AttendAll(arr);

}

Can you help me what’s wrong with this code

Hello @Neil028 what is the logic that you are using?
your have not implemented your code in the correct way.
i dont think this code can be of video.
your code is totally wrong.
Here for your reference i am attaching the code:


if you have any doubt you can ask here:
Happy Learning!!

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.