Runguard: warning: timelimit exceeded (wall time): aborting command runguard: warning: command terminated with signal 15

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;
}

hi @Jitinkansal please share your code using CB IDE and also share your approach as well.

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.