| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1360141 | dukkha | Balloons (CEOI11_bal) | C++20 | 68 ms | 1884 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<long long> xs;
vector<double> rs;
xs.reserve(n);
rs.reserve(n);
cout << fixed << setprecision(3);
for (int i = 0; i < n; i++) {
long long x;
double r;
cin >> x >> r;
double cur = r;
while (!xs.empty()) {
long long dx = x - xs.back();
double top_r = rs.back();
double cand = (double)dx * dx / (4.0 * top_r);
if (cand < cur) cur = cand;
if (cur >= top_r) {
xs.pop_back();
rs.pop_back();
} else {
break;
}
}
xs.push_back(x);
rs.push_back(cur);
cout << cur << '\n';
}
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
