Advertisement
MohamedAbdel3al

Laptops

Sep 19th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std ;
  4. #define sz(s) int(s.size())
  5. #define all(v) v.begin() , v.end()
  6. #define imin INT_MIN
  7. #define imax INT_MAX
  8. typedef long long ll ;
  9.  
  10. void ABDEL3AL () {
  11. ios_base::sync_with_stdio(false); cin.tie(nullptr) , cout.tie(nullptr) ;
  12. #ifndef ONLINE_JUDGE
  13. freopen("input.txt" , "r" , stdin) , freopen("output.txt" , "w" , stdout) ;
  14. #endif
  15. }
  16.  
  17. int main() {
  18. ABDEL3AL() ;
  19. int n ; cin >> n ;
  20. pair <int , int> arr[n] ;
  21. for (int i = 0; i < n; i++) cin >> arr[i].first >> arr[i].second ;
  22. for (int i = 1; i < n; i++) {
  23. if ((arr[i].first > arr[i].second) && (arr[i - 1].first < arr[i - 1].second))
  24. return cout << "Happy Alex" , 0 ;
  25. }
  26. cout << "Poor Alex" ;
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement