Codeforces Global Round 9 1375C. Element Extermination Solution
Problem Link: https://codeforces.com/problemset/problem/1375/C
Solution in C++:
- /// La ilaha illellahu muhammadur rasulullah
- ///******Bismillahir-Rahmanir-Rahim******///
- /// Abul Hasnat Tonmoy
- /// Department of CSE,23rd batch
- /// Islamic University,Bangladesh
- ///**********ALLAH IS ALMIGHTY************///
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int t;
- cin >> t;
- while (t--) {
- int n;
- cin >> n;
- std::vector<int> v(n);
- for (int i = 0; i < n; i++) cin >> v[i];
- if (v[0] < v[n - 1])
- cout << "YES" << endl;
- else
- cout << "NO" << endl;
- }
- }
No comments