Submission #1091243

# Submission time Handle Problem Language Result Execution time Memory
1091243 2024-09-20T08:26:39 Z speedcode Balloons (CEOI11_bal) C++17
40 / 100
2000 ms 2828 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    vector<float> res1 = {};
    vector<float> res2 = {};
    for(int i = 0; i < n; i++){
        float a;
        float b;
        cin >> a >> b;
        for(int j = 0; j < i; j++){
            b = min(b, (a-res1[j])*(a-res1[j])/4/res2[j]);
        }

        cout << fixed << setprecision(3) << b << '\n';

        res1.push_back(a);
        res2.push_back(b);
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB 10 numbers
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB 1st numbers differ - expected: '247294217.0000000000', found: '247294224.0000000000', error = '7.0000000000'
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 Correct 6 ms 348 KB 2000 numbers
# Verdict Execution time Memory Grader output
1 Correct 236 ms 1120 KB 20000 numbers
# Verdict Execution time Memory Grader output
1 Incorrect 1343 ms 2000 KB 558th numbers differ - expected: '14792.0000000000', found: '14793.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2053 ms 2556 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2032 ms 2828 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2061 ms 2768 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2040 ms 2552 KB Time limit exceeded
2 Halted 0 ms 0 KB -