Submission #970481

#TimeUsernameProblemLanguageResultExecution timeMemory
970481AiperiiiBalloons (CEOI11_bal)C++14
100 / 100
264 ms5528 KiB
#include <bits/stdc++.h> #define int long long #define ld long double #define ff first #define ss second #define pb push_back #define all(x) x.begin(),x.end() using namespace std; signed main(){ ios_base::sync_with_stdio(); cin.tie(0);cout.tie(0); int n; cin>>n; vector <pair <ld,ld> > pr; for(int i=0;i<n;i++){ ld x,r; cin>>x>>r; while(!pr.empty()){ ld x1=pr.back().ff; ld r1=pr.back().ss; r=min(r,(x-x1)*(x-x1)/(4*r1)); if(r1<=r)pr.pop_back(); else break; } cout<<fixed<<setprecision(3)<<r<<"\n"; pr.pb({x,r}); } } /* 3 0 9 8 1 13 7 */
#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...