#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge {c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
*this << "[";
for (auto it = d.b; it != d.e; ++it)
*this << ", " + 2 * (it == d.b) << *it;
ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// ll my_rand(ll l, ll r) {
// return uniform_int_distribution<ll>(l, r) (rng);
// }
void tcase(int Tcase)
{
int n, x, y, temp, gap = 0;
scanf("%d %d %d",&n, &x, &y);
int a[n+5];
memset(a, 0, (n+5)*sizeof(a[0]));
for(int i = 0; i < x; i++){
scanf("%d",&temp;);
a[temp] = 1;
}
for(int i = 1; i < n-1; i++){
if(a[i] && a[i+2]){
gap++;
if(a[i+1]){
x--;
a[i+1] = 0;
}
}
}
if(a[n-1] && a[1]){
gap++;
if(a[n]){
x--;
a[n] = 0;
}
}
if(a[n] && a[2]){
gap++;
if(a[1]){
x--;
a[1] = 0;
}
}
printf("%dn",x-2+gap);
}
int main(){
int T = 1;
scanf("%d",&T);
for(int Tcase = 1; Tcase <= T; Tcase++){
tcase(Tcase);
}
//tcase();
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}