Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Вариант 9
- Задача 3
- */
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- double x, y, r;
- cin >> x >> y;
- r = sqrt(x * x + y * y);
- if(y >= 0){
- if(r > 20){
- cout << "NO" << endl;
- }else{
- if(x >= 0){
- if(r < 10){
- cout << "NO" << endl;
- }else{
- cout << "YES" << endl;
- }
- }else{
- if(x > -10 && y < 10){
- cout << "NO" << endl;
- }else{
- cout << "YES" << endl;
- }
- }
- }
- }else{
- if(y < -20 || (x > 20 || x < -20)){
- cout << "NO" << endl;
- }else{
- if(x >= 0){
- if(x < 10 && y > -10){
- cout << "NO" << endl;
- }else{
- cout << "YES" << endl;
- }
- }else{
- if(r < 10){
- cout << "NO" << endl;
- }else{
- cout << "YES" << endl;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment