Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- const double pi=3.14159265359;
- int main()
- {
- ios::sync_with_stdio(false);
- cin.tie(0);
- cout.tie(0);
- double a,b,z;
- cin>>a>>b>>z;
- if(z==90) {cout<<fixed<<setprecision(3)<<b*a*sqrt(2); return 0;}
- z=z*pi/180;
- double a1=a*sqrt(2.0);
- double a2=2*(a*sqrt(2.0)/2-(b*cos(z)/sin(z)));
- a2=max(0.0,a2);
- double h0=min(b/sin(z),(a1/2)/cos(z));
- cout<<fixed<<setprecision(3)<<(a1+a2)/2*h0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement