# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
465431 |
2021-08-16T03:25:55 Z |
Cxrles |
Balloons (CEOI11_bal) |
C++17 |
|
783 ms |
5516 KB |
#include<bits/stdc++.h>
using namespace std;
int main(){
cout<<fixed<<setprecision(3);
int n;
cin>>n;
stack<pair<long double, long double>> s;
for(int i=1;i<=n;i++){
int x;
long double r;
cin>>x>>r;
while(s.size()){
int x1= s.top().first;
long double r1= s.top().second;
r=min(r,(long double)pow(x-x1,2)/(4.0*r1));
if(r>=r1){
s.pop();
} else{
break;
}
}
cout<<r<<endl;
s.push({x,r});
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 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 |
7 ms |
204 KB |
2000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
70 ms |
448 KB |
20000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
193 ms |
1064 KB |
50000 numbers |
2 |
Correct |
203 ms |
1568 KB |
49912 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
355 ms |
1396 KB |
100000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
420 ms |
1584 KB |
115362 numbers |
2 |
Correct |
436 ms |
3300 KB |
119971 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
572 ms |
1852 KB |
154271 numbers |
2 |
Correct |
783 ms |
5516 KB |
200000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
701 ms |
1912 KB |
200000 numbers |
2 |
Correct |
722 ms |
5396 KB |
199945 numbers |