文章
5
粉丝
63
获赞
0
访问
2.5k
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int main(void) {
int t;
cin >> t;
int a[100];
for (int i = 0; i < t; i++) {
int n;
cin >> n;
for (int j = 0; j < n; j++) {
cin >> a[j];
}
bool flag = true;
for (int j = 0; j < n; j++) {
if (a[j] % 2 != a[0] % 2) {
flag = false;
break;
}
}
if (flag) cout << "YES" << endl;
else cout << "NO" << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发