Skip to content

Commit fa1b63c

Browse files
committed
Add 20206.cpp
1 parent 59a07c8 commit fa1b63c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

20xxx/20206.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
bool solve(void) {
5+
int a, b, c; cin >> a >> b >> c;
6+
int x1, x2, y1, y2; cin >> x1 >> x2 >> y1 >> y2;
7+
8+
int p1 = a * x1 + b * y1 + c;
9+
int p2 = a * x1 + b * y2 + c;
10+
int p3 = a * x2 + b * y1 + c;
11+
int p4 = a * x2 + b * y2 + c;
12+
13+
return ((p1 <= 0) && (p2 <= 0) && (p3 <= 0) && (p4 <= 0)) || ((p1 >= 0) && (p2 >= 0) && (p3 >= 0) && (p4 >= 0));
14+
}
15+
16+
int main(void) {
17+
ios::sync_with_stdio(false);
18+
cin.tie(nullptr);
19+
20+
cout << (solve() ? "Lucky" : "Poor");
21+
return 0;
22+
}

0 commit comments

Comments
 (0)