#include<cstdio>
#include<algorithm>
#include<vector>
#include<cmath>
long long s,a,b,n,k,i,j,D[44][44];
long long C(long long N,long long R)
{
if(D[N][R])return D[N][R];
if(R==0||R==N)return D[N][R]=1;
if(R==1)return D[N][R]=N;
return D[N][R]=C(N-1,R)+C(N-1,R-1);
}
main()
{
scanf("%lld%lld%lld%lld",&a,&b,&n,&k);
i=0;
while(s<k)
{
s+=C(n,i);
i++;
}
k=n-i+1;
if(a>b)j=a,a=b,b=j;
double sq=(double)(a*b)/(double)2;
for(j=1;j<=k;j++)
{
sq*=(double)(b*b)/(double)(a*a+b*b);
}
for(j=k+1;j<=n;j++)
{
sq*=(double)(a*b)/(double)(a*a+b*b);
}
printf("%.10lf",log(sq));
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
1204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |