Submission #924843

# Submission time Handle Problem Language Result Execution time Memory
924843 2024-02-09T22:32:07 Z VMaksimoski008 Balloons (CEOI11_bal) C++14
0 / 100
2000 ms 5444 KB
#include <bits/stdc++.h>

#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
//#define int long long

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;

const int mod = 1e9 + 7;
const int LOG = 20;
const int maxn = 1e5 + 5;
const double eps = 1e-9;

int32_t main() {
    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++) {
        for(int j=0; j<i; j++)
            v[i].second = min(v[i].second, (v[j].first + v[i].first) * (v[j].first + v[i].first) / (4 * v[j].second));
        cout << v[i].second << '\n';
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 2nd numbers differ - expected: '4.1670000000', found: '7.0000000000', error = '2.8330000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 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 344 KB 2nd numbers differ - expected: '0.0010000000', found: '0.0105600000', error = '0.0095600000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 348 KB 3rd numbers differ - expected: '121.0000000000', found: '123.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 328 ms 1092 KB 3rd numbers differ - expected: '211.0000000000', found: '213.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1981 ms 2304 KB 5th numbers differ - expected: '15395.0000000000', found: '15396.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2032 ms 3992 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2029 ms 3828 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2023 ms 4800 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2025 ms 5444 KB Time limit exceeded
2 Halted 0 ms 0 KB -