/*简单结构体的排序,然后在判断一下*/
#include<cstdio>
#include<cstring>
#include<cmath>
#include<climits>
#include<cctype>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<queue>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<stack>
#define ll long long
#define MAX 100010
#define INF INT_MAX
#define eps 1e-8
using namespace std;
struct Node{
int x,y;
bool operator < (const Node& rhs) const{
return rhs.x < x;
}
}p[MAX];
int main(){
int n;
while (scanf("%d",&n) != EOF){
for (int i=0; i<n; i++) scanf("%d%d",&p[i].x,&p[i].y);
sort(p,p+n);
int ok = 0;
for (int i=1; i<n; i++){
if (p[i].y > p[i-1].y) ok = 1;
}
if (ok) printf("Happy Alex\n");
else printf("Poor Alex\n");
}
return 0;
}
Codeforces Round #260 (Div. 2)A. Laptops
最新推荐文章于 2019-03-07 11:34:00 发布