# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
768154 |
2023-06-27T15:25:18 Z |
vjudge1 |
Balloons (CEOI11_bal) |
C++17 |
|
2000 ms |
9732 KB |
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
const int N=2e5;
int n;
struct dt{
double x,r;
};
dt a[N+10];
double Ri(dt b, dt c){
return (b.x-c.x)*(b.x-c.x)/(4*c.r);
}
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;
for (int j=1;j<=i-1;j++){
R = min(R,Ri(a[i],a[j]));
}
if (R != a[i].r)
R-=0.0000000001;
a[i].r=R;
cout <<fixed<<setprecision(9)<<R<<endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
10 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
332 KB |
2 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
505 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
436 KB |
2000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
781 ms |
1444 KB |
20000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2059 ms |
3080 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2044 ms |
5408 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2068 ms |
6096 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2066 ms |
7876 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2054 ms |
9732 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |