using ll=longlong; using ull=unsignedlonglong; using pii=pair<int,int>; #define begend(x) x.begin(),x.end() #define mem0(x) memset(x,0,sizeof(x)) #define YES puts("Yes") #define NO puts("No")
intread(){ int f=1,x=0;char c=getchar(); while(!isdigit(c)){if(c=='-')f=-1;c=getchar();} while(isdigit(c)){x=x*10+c-'0';c=getchar();} return x*f; }
voidsolve(){ int n=read(); int ans =0 ; for(int i=0;i<n;i++){ int a=read(),b=read(); if(a-b>0)ans++; } printf("%d\n",ans); }
intmain(){ int T=read(); while(T--){ solve(); } return0; }
using ll=longlong; using ull=unsignedlonglong; using pii=pair<int,int>; #define begend(x) x.begin(),x.end() #define mem0(x) memset(x,0,sizeof(x)) #define YES puts("Yes") #define NO puts("No")
intread(){ int f=1,x=0;char c=getchar(); while(!isdigit(c)){if(c=='-')f=-1;c=getchar();} while(isdigit(c)){x=x*10+c-'0';c=getchar();} return x*f; }
using ll=longlong; using ull=unsignedlonglong; using pii=pair<int,int>; #define begend(x) x.begin(),x.end() #define mem0(x) memset(x,0,sizeof(x)) #define YES puts("Yes") #define NO puts("No")
intread(){ int f=1,x=0;char c=getchar(); while(!isdigit(c)){if(c=='-')f=-1;c=getchar();} while(isdigit(c)){x=x*10+c-'0';c=getchar();} return x*f; }
using ll=longlong; using ull=unsignedlonglong; using pii=pair<int,int>; #define begend(x) x.begin(),x.end() #define mem0(x) memset(x,0,sizeof(x)) #define YES puts("Yes") #define NO puts("No")
intread(){ int f=1,x=0;char c=getchar(); while(!isdigit(c)){if(c=='-')f=-1;c=getchar();} while(isdigit(c)){x=x*10+c-'0';c=getchar();} return x*f; }
voidsolve(){ int n=read(),d=read(),h=read(); vector<int> y; for(int i=0;i<n;i++){ y.push_back(read()); } sort(begend(y),greater<int>());
double ans = 0; for(int i=0;i<n;i++){ if(i==0){ // 第一个 ans += (double)d*h/2; continue; }
if(y[i]+h>y[i-1]){ int realh = y[i-1]-y[i]; // 梯形的高度 double realup = d*1.0*(((double)h-realh)/(double)h); // 梯形的上底 ans += (realup+d)*realh/2; } else{ ans += (double)d*h/2; } }
printf("%f\n",ans); }
intmain(){ int T=read(); while(T--){ solve(); } return0; }
using ll=longlong; using ull=unsignedlonglong; using pii=pair<int,int>; #define begend(x) x.begin(),x.end() #define mem0(x) memset(x,0,sizeof(x)) #define YES puts("Yes") #define NO puts("No")
intread(){ int f=1,x=0;char c=getchar(); while(!isdigit(c)){if(c=='-')f=-1;c=getchar();} while(isdigit(c)){x=x*10+c-'0';c=getchar();} return x*f; } template <classT> T read(){ T f=1,x=0;char c=getchar(); while(!isdigit(c)){if(c=='-')f=-1;c=getchar();} while(isdigit(c)){x=x*10+c-'0';c=getchar();} return x*f; }
// 计算 1+q+q^2+..+q^k ll cal(ll q,int k){ ll ans = 1; ll now = 1; for(int i=0;i<k;i++){ now *= q; ans += now; } return ans; }
using ll=longlong; using ull=unsignedlonglong; using pii=pair<int,int>; #define begend(x) x.begin(),x.end() #define mem0(x) memset(x,0,sizeof(x)) #define YES puts("Yes") #define NO puts("No")
intread(){ int f=1,x=0;char c=getchar(); while(!isdigit(c)){if(c=='-')f=-1;c=getchar();} while(isdigit(c)){x=x*10+c-'0';c=getchar();} return x*f; }
int cnt1[10],cnt2[10]; constint N = 205; int a1[N],a2[N];
using ll=longlong; using ull=unsignedlonglong; using pii=pair<int,int>; #define begend(x) x.begin(),x.end() #define mem0(x) memset(x,0,sizeof(x)) #define YES puts("Yes") #define NO puts("No")
intread(){ int f=1,x=0;char c=getchar(); while(!isdigit(c)){if(c=='-')f=-1;c=getchar();} while(isdigit(c)){x=x*10+c-'0';c=getchar();} return x*f; }
constint N = 1e3+5; int rem[N],giv[N]; int cost[N];
intget_bin(){ char s[15]; scanf("%s",s); int val = 0; int l = strlen(s); for(int i=0;i<l;i++){ val*=2; val+=s[i]-'0'; } return val; }
constint M = 1030; int G[M][M]; int dis[M]; bool vis[M]; constint INF = 0x3f3f3f3f;
voidsolve(){ int n=read(),m=read(); int initial = get_bin();