Advertisement
Guest User

Untitled

a guest
May 30th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. #include<iostream>
  2. #include<stdio.h>
  3. #include<map>
  4. #include<algorithm>
  5. #include<stack>
  6. #include<queue>
  7. #include<string.h>
  8. #include<string>
  9. #include<stdlib.h>
  10. #include<math.h>
  11. #include<fstream>
  12. #include<set>
  13.  
  14. using namespace std;
  15. typedef long long int ll;
  16. typedef unsigned long long ull;
  17. int xx[]={1,1,1,0,-1,-1,-1,0}; // 8 direction
  18. int yy[]={-1,0,1,1,1,0,-1,-1}; // 8 direction
  19. int rx[] = {1,-1,0,0}; // 4 direction
  20. int ry[] = {0,0,1,-1}; // 4 direction
  21. ll gcd(ll a,ll b)
  22. { return ((a%b==0)?b:gcd(b,a%b)) ;}
  23. double pi = 2*acos(0.0);
  24.  
  25. int main()
  26. {
  27. //freopen("0in.txt", "r", stdin);
  28. // freopen("0out.txt", "w", stdout);
  29.  
  30. int tcase,t,i;
  31. double r,s;
  32.  
  33. scanf("%d",&tcase);
  34. for(t=1;t<=tcase;t++)
  35. {
  36. cin>>r>>s;
  37.  
  38. double c = acos((2*r*r - s*s)/(2*r*r));
  39. c = (180*c)/pi;
  40. if((int)c*100==9000)
  41. {
  42. printf("Yes\n");
  43. }
  44. else
  45. {
  46. printf("No\n");
  47. }
  48.  
  49. }
  50.  
  51. return 0;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement