Submission #924851

# Submission time Handle Problem Language Result Execution time Memory
924851 2024-02-09T22:46:04 Z VMaksimoski008 Balloons (CEOI11_bal) C++14
0 / 100
218 ms 5156 KB
#include <bits/stdc++.h>
using namespace std;
using pdd = pair<double, double>;

int32_t main() {
    int n;
    cin >> n;

    vector<pdd> v(n);
    for(pdd &x : v) cin >> x.first >> x.second;

    stack<int> st;
    for(int i=0; i<n; i++) {
        while(!st.empty() && v[st.top()].second <= v[i].second) st.pop();
        if(!st.empty()) v[i].second = min(v[i].second, (v[st.top()].first - v[i].first) * (v[st.top()].first - v[i].first) / (4 * v[st.top()].second));
        st.push(i);
        cout << setprecision(3) << fixed << v[i].second << '\n';
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 4th numbers differ - expected: '1.8420000000', found: '87.0000000000', error = '85.1580000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 2nd numbers differ - expected: '252735385.4379999936', found: '1000000000.0000000000', error = '747264614.5620000362'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 6th numbers differ - expected: '213.0000000000', found: '238.0000000000', error = '25.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 348 KB 2nd numbers differ - expected: '122.0020000000', found: '123.0000000000', error = '0.9980000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 22 ms 764 KB 2nd numbers differ - expected: '212.0010000000', found: '213.0000000000', error = '0.9990000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 61 ms 1480 KB 2nd numbers differ - expected: '15398.0000000000', found: '24984.0000000000', error = '9586.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 133 ms 2760 KB 2nd numbers differ - expected: '7937.0000000000', found: '10352.0000000000', error = '2415.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 131 ms 3148 KB 2nd numbers differ - expected: '5059.0000000000', found: '5060.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 218 ms 4116 KB 2nd numbers differ - expected: '1873.0000000000', found: '1874.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 216 ms 5156 KB 2nd numbers differ - expected: '2961.0000000000', found: '2962.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -