Submission #768154

#TimeUsernameProblemLanguageResultExecution timeMemory
768154vjudge1Balloons (CEOI11_bal)C++17
50 / 100
2068 ms9732 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...