| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1344653 | Zone_zonee | Balloons (CEOI11_bal) | C++20 | 91 ms | 3744 KiB |
#include <bits/stdc++.h>
using namespace std;
using ld = double;
ld calc(ld R, int x, int y){
return (y-x)*(y-x)/(4*R);
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
stack<pair<ld, int>> s;
for(int i = 1; i <= n; ++i){
int y;
ld r;
cin >> y >> r;
ld bound = r;
while(!s.empty()){
auto [R, x] = s.top();
bound = min(bound, calc(R, x, y));
if(bound >= R) s.pop();
else break;
}
s.push({bound, y});
cout << fixed << setprecision(3) << bound << '\n';
}
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
