# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
970003 |
2024-04-26T05:19:40 Z |
Aiperiii |
Balloons (CEOI11_bal) |
C++14 |
|
2000 ms |
6260 KB |
#include <bits/stdc++.h>
#define int long long
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(),x.end()
using namespace std;
signed main(){
ios_base::sync_with_stdio();
cin.tie(0);cout.tie(0);
int n;
cin>>n;
vector <int> r(n),x(n);
vector <long double> ans;
for(int i=0;i<n;i++)cin>>x[i]>>r[i];
ans.pb(r[0]);
vector <long double> R;
R.pb(r[0]);
for(int i=1;i<n;i++){
long double res=r[i];
for(int j=0;j<i;j++){
int a=(x[i]-x[j])*(x[i]-x[j]);
int b=4*R[j];
res=min(res,(long double)a/b);
}
R.pb(res);
ans.pb(res);
}
for(auto x : ans)cout<<fixed<<setprecision(3)<<x<<"\n";
}
/*
3
0 9
8 1
13 7
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
8th numbers differ - expected: '8.7410000000', found: '8.8890000000', error = '0.1480000000' |
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 |
2 ms |
344 KB |
13th numbers differ - expected: '2.3960000000', found: '2.4500000000', error = '0.0540000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
14 ms |
348 KB |
3rd numbers differ - expected: '121.0000000000', found: '121.0020000000', error = '0.0020000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1259 ms |
2392 KB |
44th numbers differ - expected: '165.0000000000', found: '165.0020000000', error = '0.0020000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2047 ms |
3224 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2025 ms |
4016 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2029 ms |
4632 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2050 ms |
5352 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2036 ms |
6260 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |