# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
15271 |
2015-07-12T05:10:44 Z |
seirion |
맛있는 과자 (kriii3_A) |
C++14 |
|
0 ms |
1836 KB |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <deque>
#include <algorithm>
using namespace std;
deque<double> q;
int a, b, n, k;
double dev;
void cut() {
deque<double> temp;
for (auto d : q) {
temp.push_back(d*a*a/dev/dev);
temp.push_back(d*b*b/dev/dev);
}
q.swap(temp);
}
int main() {
cin >> a >> b >> n >> k;
dev = sqrt(a*a + b*b);
q.push_back((double)a*b/2);
while (n--) {
cut();
}
sort(q.begin(), q.end());
auto r = q.begin();
advance(r, k);
printf("%0.10f\n", log(*r));
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1836 KB |
Output is correct |
2 |
Incorrect |
0 ms |
1836 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |