# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
919091 | 2024-01-31T08:37:12 Z | Em1L | Balloons (CEOI11_bal) | C++14 | 149 ms | 6480 KB |
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, double>; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout << setprecision(3) << fixed; int n; cin >> n; stack < pii > st; auto GetR = [&](pii A, int x) { auto [x_, r_] = A; return (x_ - x) * (x_ - x) / (4 * r_); }; for (int i = 0, x, r; i < n; i++) { cin >> x >> r; double R = r; while (!st.empty()) { double curR = GetR(st.top(), x); R = min(R, curR); if (R >= st.top().second) { st.pop(); } else { break; } } cout << R << "\n"; st.push(make_pair(x, R)); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | 10 numbers |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | 2nd numbers differ - expected: '252735385.4379999936', found: '0.9330000000', error = '252735384.5049999952' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | 505 numbers |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 348 KB | 506th numbers differ - expected: '365.0000000000', found: '-2481854.0649999999', error = '2482219.0649999999' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 16 ms | 1112 KB | 655th numbers differ - expected: '591.0000000000', found: '-2402336.3029999998', error = '2402927.3029999998' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 37 ms | 1616 KB | 4th numbers differ - expected: '15396.0000000000', found: '-8148.5510000000', error = '23544.5510000000' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 83 ms | 3408 KB | 7234th numbers differ - expected: '7160.0000000000', found: '-2398141.9989999998', error = '2405301.9989999998' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 84 ms | 3880 KB | 4643rd numbers differ - expected: '2427.0000000000', found: '-2355611.7020000000', error = '2358038.7020000000' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 127 ms | 4944 KB | 1734th numbers differ - expected: '1856.0220000000', found: '-2324667.3859999999', error = '2326523.4079999998' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 149 ms | 6480 KB | 2723rd numbers differ - expected: '859.0470000000', found: '-2333711.4849999999', error = '2334570.5319999997' |
2 | Halted | 0 ms | 0 KB | - |