# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
469306 |
2021-08-31T11:41:38 Z |
Autron |
Balloons (CEOI11_bal) |
C++14 |
|
777 ms |
6604 KB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
stack<pair<double, double>> s;
for(int i=1;i<=n;++i){
double x, r;
cin>>x>>r;
while(!s.empty()){
double x1, r1;
tie(x1, r1)=s.top();
double val=((x1-x)*(x1-x))/(4*r1);
r=min(r, val);
if(r>=r1) s.pop();
else break;
}
s.push({x, r});
cout<<fixed<<setprecision(9)<<r<<"\n";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
10 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 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 |
10 ms |
204 KB |
2000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
76 ms |
452 KB |
20000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
191 ms |
1160 KB |
50000 numbers |
2 |
Correct |
207 ms |
1756 KB |
49912 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
408 ms |
1896 KB |
100000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
460 ms |
2116 KB |
115362 numbers |
2 |
Correct |
461 ms |
4036 KB |
119971 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
599 ms |
2660 KB |
154271 numbers |
2 |
Correct |
775 ms |
6596 KB |
200000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
766 ms |
3044 KB |
200000 numbers |
2 |
Correct |
777 ms |
6604 KB |
199945 numbers |