#include <bits/stdc++.h>
#define vi vector<int>
#define ve vector
#define ll long long
#define vf vector<float>
#define vll vector<pair<ll,ll>>
#define ii pair<int,int>
#define vvi vector<vi>
#define vii vector<ii>
#define gii greater<ii>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define INF 1e16
#define eps 1e-7
#define eps1 1e-25
#define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define MAX_A 1e5+5
#define V 450
using namespace std;
const int MOD = 1e9+7;
const int nax = 2e5+5;
ve<pair<long double,long double>> s;
long double a[nax];
int main(){
optimise;
int n;
cin >> n;
for (int i = 0; i < n; ++i)
{
long double x,mr;
cin >> x >> mr;
s.pb({x,mr});
}
for (int i = 0; i < n; ++i)
{
long double mx = s[i].se;
for (int j = 0; j < i; ++j)
{
long double r = ((s[j].fi-s[i].fi)*(s[j].fi-s[i].fi))/(long double) (4*a[j]);
mx = min(mx, r);
}
a[i] = mx;
cout << mx << endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
10 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
1st numbers differ - expected: '247294217.0000000000', found: '247294000.0000000000', error = '217.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
332 KB |
505 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
460 KB |
2000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
913 ms |
1484 KB |
2953rd numbers differ - expected: '1030.4380000000', found: '1030.4400000000', error = '0.0020000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2062 ms |
2716 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2081 ms |
4484 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2051 ms |
4716 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2072 ms |
8624 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2065 ms |
8816 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |