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:
parent
fa0a2c8f33
commit
c945e46541
25
CodeForces/1604/B/B.cpp
Normal file
25
CodeForces/1604/B/B.cpp
Normal 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user