#include
#include
using namespace std;
int main()
{
int t,i,j;
cin>>t;
while(t–)
{
int n,u,d;
int flag=0,count=0;
cin>>n;
int a[n];
cin>>u>>d;
for(i=0;i<n;i++)
{
cin>>a[i];
}
for(i=0;i<n-1;i++)
{
int w=abs(a[i+1]-a[i]);
//main part
if(a[i+1]>a[i] && w>u)
{
break;
}
if(w==0)
{
flag++;
}
if(a[i+1]>a[i] && w<=u)
{
flag++;
}
if(a[i+1]<a[i] && w>d && count==0 )
{
flag++;
count=1;
}
if(a[i+1]<a[i] && w>d && count==1 )
{
break;
}
if(a[i+1]<a[i] && w<=d)
{
flag++;
}
}
cout<<flag+1<<endl;
}
return 0;
}
// it works fine in my compiler but codechef says its wrong
can anyone give me one case in which it will not work