-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA_Laptops.cpp
More file actions
47 lines (36 loc) · 824 Bytes
/
A_Laptops.cpp
File metadata and controls
47 lines (36 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <climits>
#include <cstring>
using ll= long long;
using ull= unsigned long long;
using lld= long double;
#define GREETINGS_FROM_LOS_POCATOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
int main() {
GREETINGS_FROM_LOS_POCATOS
int n;
cin >> n;
vector<pair<int, int>> a(n);
for (auto &&i : a)
{
cin >> i.first >> i.second;
}
sort(a.begin(), a.end());
for (size_t i = 0; i < n - 1; i++)
{
if(a[i].second > a[i + 1].second) {
cout << "Happy Alex" << endl;
return 0;
}
}
cout << "Poor Alex" << endl;
return 0;
}