We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59a07c8 commit fa1b63cCopy full SHA for fa1b63c
20xxx/20206.cpp
@@ -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