Submission #1093235

#TimeUsernameProblemLanguageResultExecution timeMemory
1093235irmuunBalloons (CEOI11_bal)C++17
10 / 100
2036 ms9304 KiB
#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 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...