C. Make Equal With Mod
#include <iostream>
#include <cstring>
#include <set>
#include <algorithm>
#include <cmath>
#include <map>
#include <vector>
#include <queue>
#include <stack>
using namespace std;
#define endl "\n"
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
template <typename T>
inline void rd(T &a)
{ char c = getchar();
T x = 0, f = 1;
while (!isdigit(c))
{if (c == '-')f = -1;c = getchar();
}
while (isdigit(c))
{ x = (x << 1) + (x << 3) + c - '0';c = getchar();}
a = f * x;
}
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
const int N = 1e5+10;
int a[N];
void solve()
{
int _______, has1 = 0, has0 = 0;
cin >> _______;
for(int i = 1; i <= _______; i ++)
{
cin >> a[i];
if(a[i] == 1) has1 = 1;
else if(a[i] == 0) has0 = 1;
}
if(has1 == 0)
{
cout << "Yes\n";
return;
}
if(has1 && has0)
{
cout << "No\n";
return;
}
sort(a+1,a+1+_______);
int _________________ = 1;;
for(int i = 2; i <= _______; i ++)
{
if(a[i] - a[i-1] == 1 && has1 == 1)
{
_________________ = 0;
break;
}
}
if(_________________) cout << "Yes\n";
else cout << "No\n";
}
int main()
{
int ________________________;
cin >> ________________________;
while (________________________--)
{
solve();
}
}