# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
15470 |
2015-07-12T08:09:03 Z |
yukariko |
맛있는 과자 (kriii3_A) |
C++ |
|
0 ms |
1744 KB |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
long double A,B,C,L;
long double AA,BB;
int N;
long long K;
int main()
{
cin >> A >> B >> N >> K;
for(int i=N-1; i >= 0; i--)
{
C = sqrtl(A*A+B*B);
L = A * B / C;
AA = sqrtl(A * A - L * L);
BB = C - AA;
if((1LL << i) >= K)
{
A = L;
if(AA < BB)
B = BB;
else
B = AA;
}
else
{
A = L;
if(AA < BB)
B = AA;
else
B = BB;
K -= 1LL << i;
}
}
printf("%.12Lf",logl(A*B/2));
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1744 KB |
Output is correct |
2 |
Incorrect |
0 ms |
1744 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |