|  | 
|  | 
| вернуться в форум | Fail solution is accepted Hi, my solution is:
 #include <iostream>
 #include <cstdio>
 #include <cmath>
 #include <stdlib.h>
 #include <valarray>
 using namespace std;
 
 double const pi=acos(-1.0);
 
 int main()
 {
 long long a,b,d;
 cin >> a >> b >> d;
 long long R1, r1, R2, r2, h;
 cin>>r1>>R1>>r2>>R2>>h;
 if(
 pi*R1*R1+pi*R2*R2>a*b ||
 2* max(r1,r2) > min(a,b))
 {
 cout<<"NO"<<endl;
 return 0;
 }
 if(d>=h && 2*max(R1,R2) > min(a,b))
 {
 cout<<"NO"<<endl;
 return 0;
 }
 else cout <<"YES"<<endl;
 return 0;
 }
 
 But is wrong, ofcourse.
 Add new tests, please =)
Now this solution gets WA (-) | 
 | 
|