# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
768194 |
2023-06-27T16:47:12 Z |
vjudge1 |
Balloons (CEOI11_bal) |
C++17 |
|
386 ms |
9252 KB |
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
const int N=2e5, pi=3.14;
int n;
struct dt{
double x,r;
};
double Ri(dt b, dt c){
return (b.x-c.x)*(b.x-c.x)/(4*c.r);
}
double area(dt b){
return b.r*b.r*3.14;
}
dt a[N+10];
deque<dt> q;
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin>>n;
for (int i=1;i<=n;i++)
cin>>a[i].x>>a[i].r;
for (int i=1;i<=n;i++){
double R = a[i].r;
while(!q.empty()){
R = min(R,Ri(a[i],q.front()));
if (R<q.front().r)
break;
else
q.pop_front();
}
q.push_back({a[i].x,R});
if (R != a[i].r) R-=0.000000001;
cout <<fixed<<setprecision(9)<<R<<endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
10 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
340 KB |
2 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
13th numbers differ - expected: '2.3960000000', found: '6.2546948350', error = '3.8586948350' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
340 KB |
6th numbers differ - expected: '116.0020000000', found: '117.0000000000', error = '0.9980000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
39 ms |
1220 KB |
11th numbers differ - expected: '201.0010000000', found: '202.0000000000', error = '0.9990000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
98 ms |
2748 KB |
5th numbers differ - expected: '15395.0000000000', found: '15396.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
198 ms |
4908 KB |
14th numbers differ - expected: '7919.0000000000', found: '7920.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
226 ms |
5696 KB |
5th numbers differ - expected: '5054.0000000000', found: '5055.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
312 ms |
7528 KB |
15th numbers differ - expected: '1860.0000000000', found: '1861.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
386 ms |
9252 KB |
11th numbers differ - expected: '2951.0000000000', found: '2952.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |