Submission #15449

#TimeUsernameProblemLanguageResultExecution timeMemory
15449yukariko맛있는 과자 (kriii3_A)C++98
0 / 33
0 ms1828 KiB
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> using namespace std; double A,B,C,L; double AA,BB; int N; long long K; int main() { cin >> A >> B >> N >> K; for(int i=N; i; i--) { C = sqrt(A*A+B*B); L = A * B / C; AA = sqrt(A * A - L * L); BB = C - AA; if((1LL << i) > K) { if(AA < BB) { A = L; B = BB; } else { A = L; B = AA; } } else { if(AA < BB) { A = L; B = AA; } else { A = L; B = BB; } K -= 1LL << i; } } printf("%.9f",log(A*B/2)); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...