From fa1b63cfacbe87ef236f1291c3238b2405b29e9e Mon Sep 17 00:00:00 2001 From: Jihoon Lee Date: Tue, 18 Jun 2024 18:03:22 +0900 Subject: [PATCH] Add 20206.cpp --- 20xxx/20206.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 20xxx/20206.cpp diff --git a/20xxx/20206.cpp b/20xxx/20206.cpp new file mode 100644 index 00000000..e3e51893 --- /dev/null +++ b/20xxx/20206.cpp @@ -0,0 +1,22 @@ +#include +using namespace std; + +bool solve(void) { + int a, b, c; cin >> a >> b >> c; + int x1, x2, y1, y2; cin >> x1 >> x2 >> y1 >> y2; + + int p1 = a * x1 + b * y1 + c; + int p2 = a * x1 + b * y2 + c; + int p3 = a * x2 + b * y1 + c; + int p4 = a * x2 + b * y2 + c; + + return ((p1 <= 0) && (p2 <= 0) && (p3 <= 0) && (p4 <= 0)) || ((p1 >= 0) && (p2 >= 0) && (p3 >= 0) && (p4 >= 0)); +} + +int main(void) { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + cout << (solve() ? "Lucky" : "Poor"); + return 0; +} \ No newline at end of file