0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 03:18:53 +00:00

B - XOR Specia-LIS-t

https://codeforces.com/contest/1604/submission/133638242
This commit is contained in:
Baoshuo Ren 2021-10-30 23:02:30 +08:00 committed by Baoshuo Ren
parent fa0a2c8f33
commit c945e46541
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

25
CodeForces/1604/B/B.cpp Normal file
View File

@ -0,0 +1,25 @@
#include <bits/stdc++.h>
using namespace std;
int t, n, a[100005];
int main() {
cin >> t;
while (t--) {
bool flag = false;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
if (n % 2 == 0) {
cout << "YES" << endl;
continue;
}
for (int i = 1; i < n; i++) {
flag = flag || a[i] >= a[i + 1];
}
cout << (flag ? "YES" : "NO") << endl;
}
return 0;
}