The ZCO scholarship contest offers scholarships to first time ZCO participants. You are participating in it for the first time. So you want to know the number of participants who'll get the scholarship.
You know that the maximum number of scholarships offered is $R$ and there are a total of $N$ participants numbered from $1$ to $N$. Out of these, you know the set of people (denoted by $X$) who you know, had participated in previous year ZCOs and hence, they shall not get the scholarship.
Further, as the world isn't free from plagiarism, so is the case with the scholarship contest. And from your secret sources, you also know the set of people (denoted by set $Y$) who were involved in plagiarism and therefore aren't eligible for scholarship either.
Find out the number of participants who shall get the scholarship.
PS: Don't ask how so many scholarships are being offered when you see the constraints on $R$. You never questioned it when in mathematics classes, some person bought $80$ watermelons twice just to compare them and save $₹1$. 

-----Input:-----
- The first line will contain a single integer, $T$, the number of testcases. Then the testcases follow. 
- The first line of each test case contains four integers; $N$, $R$, $|X|$ and $|Y|$ denoting the number of participants, maximum number of scholarships offered, number of old participants, and the number of participants involved in plagiarism, respectively.
- The second line of each test case contains $|X|$ space separated integers $x_1, x_2 \ldots x_{|X|}$ denoting the indices of people who participated in previous years. If $X$ is empty, this line is skipped and no empty line is in the input.
- The third line of each test case contains $|Y|$ space separated integers $y_1, y_2 \ldots y_{|Y|}$  denoting the indices of people who are involved in plagiarism. If $Y$ is empty, this line is skipped and no empty line is in input.

-----Output:-----
For each testcase, print a single integer in a new line, denoting the number of participants who shall get the scholarship.

-----Constraints-----
- $1 \leq T \leq 1000$
- $1 \leq N \leq 10^{15}$
- $0 \leq R \leq 10^{15}$
- $0 \leq |X|, |Y| \leq min(N, 2*10^5)$
- $1 \leq x_i, y_i \leq N$
- All $x_i$ are distinct
- All $y_i$ are distinct
- Sum of $|X|$ over all test cases does not exceed $5*10^5$
- Sum of $|Y|$ over all test cases does not exceed $5*10^5$

-----Subtasks-----
- 20 points : $1 \leq N \leq 10^3$, and the sum of $N$ over all test cases does not exceed $3*10^3$
- 30 points : $1 \leq N \leq 2*10^5$, and the sum of $N$ over all test cases does not exceed $5*10^5$
- 50 points: Original constraints

-----Sample Input:-----
3
5 3 0 1
4
10 2 4 6
3 1 7 6
4 3 1 5 9 7
10 4 4 6
3 1 7 6
4 3 1 5 9 7

-----Sample Output:-----
3
2
3

-----EXPLANATION:-----
- In the first testcase, only participant $4$ is involved in plagiarism, and thus not eligible for the scholarship. No user has participated in previous years, and so no empty line is there in the sample. All participants except participant $4$ are eligible for the scholarship, but only three of them get it because $R = 3$.
- Both second and third testcases are the same, except for $R$. In both samples, only participants $2$, $8$ and $10$ are eligible for scholarships.
- In the second testcase, since the maximum number of scholarships is $2$, only $2$ participants get scholarships.
- In the third testcase, all three eligible participants get scholarships.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'test=int(input())\nfor loop in range(test):\n flag=0\n (sch,ele,inele)=(0,0,0)\n xl=[]\n yl=[]\n (n,r,x,y)=map(int,input().split())\n if x>0:\n  xindex=input().split()\n  for q in range(x):\n   xl.append(int(xindex[q]))\n if y>0:\n  yindex=input().split()\n  for p in range(y):\n   yl.append(int(yindex[p]))\n try:\n  for a in xl:\n   if a in yl:\n    flag+=1\n except NameError:\n  flag=0\n sch=x+y-(2*flag)\n inele=sch+flag\n ele=n-inele\n print(min(ele,r))'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13397