# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1093235 |
2024-09-26T10:01:57 Z |
irmuun |
Balloons (CEOI11_bal) |
C++17 |
|
2000 ms |
9304 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];
}
using ld = long double;
ld ans[n+5];
ans[1]=(ld)r[1];
for(ll i=2;i<=n;i++){
ans[i]=(ld)r[i];
for(ll j=1;j<i;j++){
ld mx=(x[i]-x[j])*(x[i]-x[j])/4.0/(ld)ans[j];
ans[i]=min(ans[i],mx);
}
}
for(ll i=1;i<=n;i++){
cout<<setprecision(5)<<ans[i]<<"\n";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
10 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
1st numbers differ - expected: '247294217.0000000000', found: '247290000.0000000000', error = '4217.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
345th numbers differ - expected: '215.0530000000', found: '215.0500000000', error = '0.0030000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
13 ms |
348 KB |
2nd numbers differ - expected: '122.0020000000', found: '122.0000000000', error = '0.0020000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1155 ms |
1360 KB |
50th numbers differ - expected: '159.0020000000', found: '159.0000000000', error = '0.0020000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2035 ms |
2648 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2036 ms |
4956 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2011 ms |
5720 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2032 ms |
7504 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2021 ms |
9304 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |