1. //Utkarsh.25dec
  2. #include <bits/stdc++.h>
  3. #define ll long long int
  4. #define pb push_back
  5. #define mp make_pair
  6. #define mod 1000000007
  7. #define vl vector <ll>
  8. #define all(c) (c).begin(),(c).end()
  9. using namespace std;
  10. ll power(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
  11. ll modInverse(ll a){return power(a,mod-2);}
  12. const int N=500023;
  13. bool vis[N];
  14. vector <int> adj[N];
  15. long long readInt(long long l,long long r,char endd){
  16. long long x=0;
  17. int cnt=0;
  18. int fi=-1;
  19. bool is_neg=false;
  20. while(true){
  21. char g=getchar();
  22. if(g=='-'){
  23. assert(fi==-1);
  24. is_neg=true;
  25. continue;
  26. }
  27. if('0'<=g && g<='9'){
  28. x*=10;
  29. x+=g-'0';
  30. if(cnt==0){
  31. fi=g-'0';
  32. }
  33. cnt++;
  34. assert(fi!=0 || cnt==1);
  35. assert(fi!=0 || is_neg==false);
  36.  
  37. assert(!(cnt>19 || ( cnt==19 && fi>1) ));
  38. } else if(g==endd){
  39. if(is_neg){
  40. x= -x;
  41. }
  42.  
  43. if(!(l <= x && x <= r))
  44. {
  45. cerr << l << ' ' << r << ' ' << x << '\n';
  46. assert(1 == 0);
  47. }
  48.  
  49. return x;
  50. } else {
  51. assert(false);
  52. }
  53. }
  54. }
  55. string readString(int l,int r,char endd){
  56. string ret="";
  57. int cnt=0;
  58. while(true){
  59. char g=getchar();
  60. assert(g!=-1);
  61. if(g==endd){
  62. break;
  63. }
  64. cnt++;
  65. ret+=g;
  66. }
  67. assert(l<=cnt && cnt<=r);
  68. return ret;
  69. }
  70. long long readIntSp(long long l,long long r){
  71. return readInt(l,r,' ');
  72. }
  73. long long readIntLn(long long l,long long r){
  74. return readInt(l,r,'\n');
  75. }
  76. string readStringLn(int l,int r){
  77. return readString(l,r,'\n');
  78. }
  79. string readStringSp(int l,int r){
  80. return readString(l,r,' ');
  81. }
  82. int sumN=0;
  83. void solve()
  84. {
  85. int n,x,y;
  86. n=readInt(1,300000,' ');
  87. x=readInt(1,1000000000,' ');
  88. y=readInt(1,1000000000,'\n');
  89. sumN+=n;
  90. assert(sumN<=300000);
  91. ll A[n+1]={0};
  92. for(int i=1;i<=n;i++)
  93. {
  94. if(i==n)
  95. A[i]=readInt(0,1000000000,'\n');
  96. else
  97. A[i]=readInt(0,1000000000,' ');
  98. }
  99. if(x<=y)
  100. {
  101. ll maxi=0;
  102. for(int i=1;i<=n;i++)
  103. maxi=max(maxi,A[i]);
  104. cout<<(maxi+y-1)/y<<'\n';
  105. }
  106. else
  107. {
  108. ll cnt=0;
  109. for(int i=n;i>=1;i--)
  110. {
  111. A[i]-=cnt*y;
  112. if(A[i]>0)
  113. cnt+=((A[i]+x-1)/x);
  114. }
  115. cout<<cnt<<'\n';
  116. }
  117. }
  118. int main()
  119. {
  120. #ifndef ONLINE_JUDGE
  121. freopen("input.txt", "r", stdin);
  122. freopen("output.txt", "w", stdout);
  123. #endif
  124. ios_base::sync_with_stdio(false);
  125. cin.tie(NULL),cout.tie(NULL);
  126. int T=readInt(1,10000,'\n');
  127. while(T--)
  128. solve();
  129. assert(getchar()==-1);
  130. cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
  131. }