-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1041.cpp
40 lines (32 loc) · 820 Bytes
/
1041.cpp
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
// https://judge.beecrowd.com/en/problems/view/1041
/*
Time Complexity =>
Space Complexity =>
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ifstream input("input.txt");
ofstream output("output.txt");
double x = 0.0, y = 0.0;
cin >> x >> y;
if (x == 0.0 && y == 0.0) {
cout << "Origem" << endl;
} else if (x == 0.0 && (y > 0 || y < 0)) {
cout << "Eixo Y" << endl;
} else if (y == 0.0 && (x > 0 || x < 0)) {
cout << "Eixo X" << endl;
} else if (x > 0.0 && y > 0.0) {
cout << "Q1" << endl;
} else if (x < 0.0 && y > 0.0) {
cout << "Q2" << endl;
} else if (x < 0.0 && y < 0.0) {
cout << "Q3" << endl;
} else if (x > 0.0 && y < 0.0) {
cout << "Q4" << endl;
}
return 0;
}