Submission #467582

# Submission time Handle Problem Language Result Execution time Memory
467582 2021-08-23T18:12:04 Z nicolaalexandra Balloons (CEOI11_bal) C++14
50 / 100
2000 ms 9472 KB
#include <bits/stdc++.h>
#define DIM 200010
using namespace std;

struct cerc{
    long long x;
    long double r;
} v[DIM];

int n,i,j;

int main (){

    //ifstream cin ("date.in");
    //ofstream cout ("date.out");

    cin>>n;
    for (i=1;i<=n;i++)
        cin>>v[i].x>>v[i].r;

    for (i=1;i<=n;i++){

        for (j=1;j<i;j++){
            v[i].r = min (v[i].r, 1.0*(v[j].x*v[j].x + v[i].x*v[i].x - 2*v[j].x*v[i].x) / (4.0*v[j].r) );
        }

        cout<<setprecision(3)<<fixed<<v[i].r<<"\n";
    }


    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB 10 numbers
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB 2 numbers
# Verdict Execution time Memory Grader output
1 Correct 2 ms 204 KB 505 numbers
# Verdict Execution time Memory Grader output
1 Correct 24 ms 392 KB 2000 numbers
# Verdict Execution time Memory Grader output
1 Correct 2000 ms 1324 KB 20000 numbers
# Verdict Execution time Memory Grader output
1 Execution timed out 2084 ms 2960 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2084 ms 4932 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2071 ms 6140 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2098 ms 7524 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2045 ms 9472 KB Time limit exceeded
2 Halted 0 ms 0 KB -