Advertisement
Ne-Biolog

Untitled

May 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <memory.h>
  4. #include <iterator>
  5. #include <cassert>
  6. #include <fstream>
  7. #include <iomanip>
  8. #include <cstdlib>
  9. #include <bitset>
  10. #include <vector>
  11. #include <cstdio>
  12. #include <string>
  13. #include <queue>
  14. #include <deque>
  15. #include <cmath>
  16. #include <ctime>
  17. #include <stack>
  18. #include <set>
  19. #include <map>
  20.  
  21. using namespace std;
  22.  
  23. const int N = (int)5000 + 10;
  24. const int INF = (int)1e9 + 10;
  25.  
  26.  
  27.  
  28. int main ()
  29. {
  30. //freopen("input.txt" , "r" , stdin);
  31. //freopen("output.txt" , "w" , stdout);
  32. ios_base::sync_with_stdio(false);
  33.  
  34. long double x, y;
  35. cin >> x >> y;
  36.  
  37. if(x * x >= (1.0 - y * y) * 2.0) {
  38. cout << "NO" << endl;
  39. return 0;
  40. }
  41.  
  42. long double yF2 = 0.5 * abs(x) + 0.5;
  43. if(yF2 <= y) {
  44. cout << "NO" << endl;
  45. return 0;
  46. }
  47.  
  48. if((x - 0.5) * (x - 0.5) < 0.3 - y * y) {
  49. cout << "NO" << endl;
  50. return 0;
  51. }
  52.  
  53. if((x + 0.5) * (x + 0.5) < 0.3 - y * y) {
  54. cout << "NO" << endl;
  55. return 0;
  56. }
  57.  
  58. cout << "YES" << endl;
  59.  
  60. return 0;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement