Submission #1093231

# Submission time Handle Problem Language Result Execution time Memory
1093231 2024-09-26T09:46:45 Z irmuun Balloons (CEOI11_bal) C++17
10 / 100
2000 ms 7784 KB
#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    ll n;
    cin>>n;
    ll x[n+5],r[n+5];
    for(ll i=1;i<=n;i++){
        cin>>x[i]>>r[i];
    }
    double ans[n+5];
    ans[1]=(double)r[1];
    for(ll i=2;i<=n;i++){
        ans[i]=(double)r[i];
        for(ll j=1;j<n;j++){
            double mx=(x[i]-x[j])*(x[i]-x[j])/4.0/(double)r[j];
            ans[i]=min(ans[i],mx);
        }
    }
    for(ll i=1;i<=n;i++){
        printf("%.5f\n",ans[i]);
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 2nd numbers differ - expected: '4.1670000000', found: '0.0000000000', error = '4.1670000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB 2 numbers
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB 3rd numbers differ - expected: '0.0420000000', found: '0.0000000000', error = '0.0420000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 348 KB 2nd numbers differ - expected: '122.0020000000', found: '0.0000000000', error = '122.0020000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 602 ms 1144 KB 2nd numbers differ - expected: '212.0010000000', found: '0.0000000000', error = '212.0010000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2051 ms 2140 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2037 ms 4188 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2021 ms 4664 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2068 ms 6236 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2058 ms 7784 KB Time limit exceeded
2 Halted 0 ms 0 KB -