Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. const double pi=3.14159265359;
  6.  
  7. int main()
  8. {
  9. ios::sync_with_stdio(false);
  10. cin.tie(0);
  11. cout.tie(0);
  12. double a,b,z;
  13. cin>>a>>b>>z;
  14. if(z==90) {cout<<fixed<<setprecision(3)<<b*a*sqrt(2); return 0;}
  15. z=z*pi/180;
  16. double a1=a*sqrt(2.0);
  17. double a2=2*(a*sqrt(2.0)/2-(b*cos(z)/sin(z)));
  18. a2=max(0.0,a2);
  19. double h0=min(b/sin(z),(a1/2)/cos(z));
  20. cout<<fixed<<setprecision(3)<<(a1+a2)/2*h0;
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement