This code works fine on other ide but giving error on coding blocks ide when compiled,why it is so…
#include
using namespace std;
int main() {
int t;
cin>>t;
while(t–)
{
int n;
cin>>n;
int c=0;
int x=0,y=0;
for(int i=0;i<n;i++)
{
int a,b;
cin>>a>>b;
if(y<=a){
x=a;
y=b;
c++;
}
}
cout<<c<<endl;
}
return 0;
}