Getting wrong answer

#include<bits/stdc++.h>
using namespace std;

bool cmp(pair<int,int> l , pair<int,int> r){
return(l.second<r.second);
}

int main() {
int t;
cin>>t;

while(t--){
	int n;
	cin>>n;
	vector<pair<int,int> >v;
	for(int i=0;i<n;i++){
	int s,e;
	cin>>s,e;
	v.push_back(make_pair(s,e));
	}

   // greedy approach
   
   sort(v.begin(),v.end(),cmp);
   int sum=1;
   int finish=v[0].second;
   for(int i=1;i<n;i++){
	   if(v[i].first>=finish){
		   finish=v[i].second;
		   sum++;
	   }
   }
   cout<<sum<<endl;


	

	
}
return 0;

}

hi @gunvirmittal_9f1753c05330d09c
write cin>>s>>e not cin>>s,e

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.