Submission #1125568

#TimeUsernameProblemLanguageResultExecution timeMemory
1125568ArtistWallBalloons (CEOI11_bal)C++20
100 / 100
466 ms2000 KiB
#include <bits/stdc++.h> using namespace std; using ld = long double; typedef pair<ld,ld> pll; ld raio(ld d,ld r2){ return (d*d)/(4*r2); } int main() { int N; cin>>N; stack<pll> stack; for(int _ = 0;_!=N;++_){ ld x,r; cin>>x>>r; while(stack.size()){ ld l = raio(stack.top().first-x,stack.top().second); l=min(l,r); if(l>=stack.top().second){ stack.pop(); r=min(l,r); }else { r=l; break; } } stack.push({x,r}); cout<<fixed<<setprecision(3)<<r<<"\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...