To Eat or Be Eaten

No attempts yetTime limit1sMemory limit256 MB

Problem

In the deep sea live two kinds of creatures, A and B. An A can eat a B only if the B is strictly smaller than that A.

For example, if the sizes of A are {8, 1, 7, 3, 1} and the sizes of B are {3, 6, 1}, then the pairs in which A can eat B are 8-3, 8-6, 8-1, 7-3, 7-6, 7-1, and 3-1 — seven pairs in total.

Given the sizes of A and B, write a program that counts how many pairs (A, B) satisfy that A's size is greater than B's size.

Input

The first line contains the number of test cases TT.

For each test case, the first line contains the count of A, NN, and the count of B, MM, separated by a space. The second line contains the NN sizes of A, and the third line contains the MM sizes of B, each separated by spaces. Every size is a positive integer. (1N,M20,0001 \le N, M \le 20{,}000)

Output

For each test case, print on its own line the number of pairs in which A's size is greater than B's size.