The Little Girl loves problems on games very much. Here's one of them.

Two players have got a string *s*, consisting of lowercase English letters. They play a game that is described by the following rules:
 -  The players move in turns; In one move the player can remove an arbitrary letter from string *s*. -  If the player before his turn can reorder the letters in string *s* so as to get a palindrome, this player wins. A palindrome is a string that reads the same both ways (from left to right, and vice versa). For example, string "abba" is a palindrome and string "abc" isn't. 
Determine which player will win, provided that both sides play optimally well — the one who moves first or the one who moves second.
The input contains a single line, containing string *s* (1 ≤ |*s*|  ≤  10<sup class="upper-index">3</sup>). String *s* consists of lowercase English letters.
t=int(input())
for i in range(t):
	n,L,R = list(map(int,input().split()))
	ar = list(map(int,input().split())) 
	ar.sort()
	r=n-1
	res=0
	x=n-1
	for l in range(0,n-1):
		if ar[l]+ar[-1]<L:
			continue
		while r>l and ar[l]+ar[r]>R:
			r-=1
		if r==l:
			break
		# x=l+1
		low=l+1
		high=r
		ans_low=r
		while low<=high:
			mid=low+(high-low)//2
			if ar[mid]+ar[l]>=L:
				ans_low=min(ans_low,mid)
				high=mid-1
			else:
				low=mid+1
		# while x<=r and ar[l]+ar[x]<L:
		# 	x+=1
		# res+=r-x+1
		res+=r-ans_low+1
	
	print(res)		
			
		