| ASU Coding Cup 11 |
|---|
| Finished |
In the depths of the Ocean, schools of young whales train in the Coral Academies. Each whale has a certain cognitive strength measured as its GPA. To support their development, the Ocean Council issues a limited number of Coral Grants.
There are $$$n$$$ young whales and $$$m$$$ Coral Grants.
The $$$i$$$-th whale has a GPA $$$a_i$$$, representing its ability to utilize a grant. The $$$j$$$-th grant requires a minimum GPA $$$b_j$$$ to be useful.
Each whale can receive at most one grant, and each grant can be assigned to at most one whale. A whale can only receive a grant if its GPA is greater than or equal to the requirement of that grant.
can you help to determine the maximum number of whales that can receive grants.
The first line contains the number of test cases $$$t$$$ $$$(1 \le t \le 10^5)$$$ — The description of the test cases follows.
The first line contains two integers $$$n$$$ and $$$m$$$ $$$(1 \le n, m \le 2 \cdot 10^5)$$$ — the number of whales and the number of Coral Grants.
The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ $$$(1 \le a_i \le 10^9)$$$ — the GPAs of the whales.
The third line contains $$$m$$$ integers $$$b_1, b_2, \ldots, b_m$$$ $$$(1 \le b_j \le 10^9)$$$ — the requirements of the grants.
It is guaranteed that the sum of $$$n$$$ and the sum of $$$m$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.
For each test case, Print a single integer — the maximum number of whales that can receive a Coral Grant.
32 45 31 2 6 41 11053 54 2 71 3 4 2 6
213
24 36 2 8 35 7 43 31 1 11 1 1
23
| Name |
|---|


