#include <bits/stdc++.h>
#define int long long int
#define debug cout<<"K"
#define mod 1000000007
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
while(t>0)
{
int mx=0;
int n,x,y;
cin>>n>>x>>y;
int a[n];
for(int i=0;i<n;i++)
{cin>>a[i];
mx=max(mx,a[i]);}
if(x>=y)
{
int c=0;
int ans=0;
for(int i=n-1;i>=0;i--)
{
a[i]-=c*y;
if(a[i]>0)
{
ans+=(a[i]+x-1)/x;
c+=(a[i]+x-1)/x;
}
}
cout<<ans<<"\n";
}
else
cout<<(mx+y-1)/y<<"\n";
t--;
}
return 0;
}