Hello, Can anyone help me out with one of my practice problem JOTH .

Please revert me the solution for this.

here’s the code:

#include

using namespace std;

int main() {

int T;

cin>>T;

while(T–)

{

int N,U,D,count=1;

cin>>N>>U>>D;

int arr[N];

for(int i=0;i<N;i++)

{

cin>>arr[i];

}

for(int i=0;i<N;i++)

{

if(arr[i]<arr[i+1])

{

if((arr[i]+U)>=arr[i+1])

count++;

else

break;

}

else if(arr[i]>arr[i+1])

{

if((arr[i]-D)<=arr[i+1])

count++;

else

{

count=count+1;

}

```
}
else
{
count++;
}
}
cout<<count<<endl;
}
return 0;
```

}