Codeforces Global Round 9 1375C. Element Extermination Solution


 

Problem Link: https://codeforces.com/problemset/problem/1375/C

Solution in C++:

  1. /// La ilaha illellahu muhammadur rasulullah
  2. ///******Bismillahir-Rahmanir-Rahim******///
  3. /// Abul Hasnat Tonmoy
  4. /// Department of CSE,23rd batch
  5. /// Islamic University,Bangladesh
  6. ///**********ALLAH IS ALMIGHTY************///
  7. #include <bits/stdc++.h>
  8. using namespace std;
  9. int main() {
  10. int t;
  11. cin >> t;
  12. while (t--) {
  13. int n;
  14. cin >> n;
  15. std::vector<int> v(n);
  16. for (int i = 0; i < n; i++) cin >> v[i];
  17. if (v[0] < v[n - 1])
  18. cout << "YES" << endl;
  19. else
  20. cout << "NO" << endl;
  21. }
  22. }

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.