Submission #15679

#TimeUsernameProblemLanguageResultExecution timeMemory
15679baneling100맛있는 과자 (kriii3_A)C++98
0 / 33
0 ms1192 KiB
#include <stdio.h> #include <math.h> int N; double A, B; long long K; int main(void) { int i; long long u=1; double Sa, Sb, A1, B1, H, temp; scanf("%lf %lf %d %lld",&A,&B,&N,&K); for(i=1 ; i<=N ; i++) u<<=1; for(i=1 ; i<=N ; i++) { u>>=1; Sa=A*A*A*B/2.0/(A*A+B*B); Sb=A*B*B*B/2.0/(A*A+B*B); A1=A*A/sqrt(A*A+B*B); B1=B*B/sqrt(A*A+B*B); H=A*B/sqrt(A*A+B*B); if(Sa>Sb) { temp=Sa; Sa=Sb; Sb=temp; temp=A1; A1=B1; B1=temp; } if(K<=u) { A=H; B=B1; } else { K-=u; A=A1; B=H; } } printf("%.12lf",log(A*B/2.0)); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...