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

Codeforces Round 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h ...

Powered by Blogger.