# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
414182 |
2021-05-30T08:37:45 Z |
Farrius |
Balloons (CEOI11_bal) |
C++11 |
|
771 ms |
6120 KB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main () {
int n;
cin >> n;
stack<pair<ld, ld>> radios;
for (int i = 0; i < n; i++) {
ld x, r;
cin >> x >> r;
while (!radios.empty()) {
ld x1, r1;
tie(x1, r1) = radios.top();
r = min(r, (x - x1) * (x - x1)/(4 * r1));
if (r >= r1) radios.pop();
else break;
}
radios.push(make_pair(x, r));
cout << fixed << setprecision(6) << r << '\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
10 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
2 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
204 KB |
505 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
332 KB |
2000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
74 ms |
704 KB |
20000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
208 ms |
1892 KB |
50000 numbers |
2 |
Correct |
201 ms |
1732 KB |
49912 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
385 ms |
3108 KB |
100000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
446 ms |
3652 KB |
115362 numbers |
2 |
Correct |
497 ms |
3880 KB |
119971 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
657 ms |
4548 KB |
154271 numbers |
2 |
Correct |
762 ms |
6016 KB |
200000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
746 ms |
5188 KB |
200000 numbers |
2 |
Correct |
771 ms |
6120 KB |
199945 numbers |