Test cases not run

when i input sample case it works fun but test cases are not run

Can you send me your code.

#include
#include
#include
#include
#include
using namespace std;
int main() {
int t=0;
cin>>t;
while(t>0)
{int n=0;
cin>>n;
int k=0;
int count=1;
int a[n][2];
int maxi=0;
for(int i=0;i<n;i++)
{for(int j=0;j<2;j++)
cin>>a[i][j];}
{for(int i=0;i<n;i++)
{for(int j=i+1;j<n;j++)
{if(a[i][1]==a[j][0])
{i=j;
count++;
k=max(count,maxi);}}}}
cout<<k<<endl;
t–;}
return 0;}

can you help me plzz

Yeah definately I will help you. Before that can you send me your complete code via some online editor. You can use https://ide.codingblocks.com/ for that.

Your logic is not correct. You first have to sort the values in terms of their starting time and then check all the conditions. Also I would recommend you to write properly indented code in order to debug easily.

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.