Submission #924846

# Submission time Handle Problem Language Result Execution time Memory
924846 2024-02-09T22:36:42 Z VMaksimoski008 Balloons (CEOI11_bal) C++14
60 / 100
2000 ms 4152 KB
#include <bits/stdc++.h>
using namespace std;
using pdd = pair<double, double>;

int32_t main() {
    ios_base::sync_with_stdio(false);
    cout.tie(0); cin.tie(0);
    
    int n;
    cin >> n;

    cout << setprecision(5) << fixed;

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

    for(int i=0; i<n; i++) {
        double curr = v[i].second;
        for(int j=0; j<i; j++)
            curr = min(curr, (v[j].first - v[i].first) * (v[j].first - v[i].first) / (4 * v[j].second));
        v[i].second = curr;
        cout << v[i].second << '\n';
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB 10 numbers
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB 2 numbers
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB 505 numbers
# Verdict Execution time Memory Grader output
1 Correct 5 ms 348 KB 2000 numbers
# Verdict Execution time Memory Grader output
1 Correct 322 ms 848 KB 20000 numbers
# Verdict Execution time Memory Grader output
1 Correct 1956 ms 1812 KB 50000 numbers
2 Correct 1948 ms 1660 KB 49912 numbers
# Verdict Execution time Memory Grader output
1 Execution timed out 2062 ms 2556 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2023 ms 2896 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2050 ms 3412 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2036 ms 4152 KB Time limit exceeded
2 Halted 0 ms 0 KB -