# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1025587 |
2024-07-17T07:50:42 Z |
sanmor |
Balloons (CEOI11_bal) |
C++17 |
|
468 ms |
5524 KB |
#include "bits/stdc++.h"
using namespace std;
stack<pair<double, double>> st;
int main(){
int n;
cin >> n;
for(int i = 0; i < n; i++){
double x, r;
cin >> x >> r;
while(!st.empty()){
auto [x1, r1] = st.top();
r = min(r, (x - x1) * (x - x1) / (4 * r1));
if(r >= r1) st.pop();
else break;
}
st.push({x, r});
cout << fixed << setprecision(3) << r << endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
10 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
2 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
505 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
348 KB |
2000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
604 KB |
20000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
122 ms |
1616 KB |
50000 numbers |
2 |
Correct |
106 ms |
1496 KB |
49912 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
217 ms |
2672 KB |
100000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
261 ms |
3244 KB |
115362 numbers |
2 |
Correct |
289 ms |
3408 KB |
119971 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
344 ms |
4208 KB |
154271 numbers |
2 |
Correct |
468 ms |
5524 KB |
200000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
463 ms |
4740 KB |
200000 numbers |
2 |
Correct |
461 ms |
5456 KB |
199945 numbers |