제출 #212115

#제출 시각아이디문제언어결과실행 시간메모리
212115LorenaMariaBalloons (CEOI11_bal)C++14
100 / 100
905 ms7204 KiB
#include <iostream> #include <iomanip> #include <stack> using namespace std; int n; struct ballon { double x,r; }b,c; stack <ballon> s; int main() { cin>>n; for(int i=1;i<=n;i++) { cin>>b.x>>b.r; while(!s.empty()) { c=s.top(); b.r=min(b.r,(c.x-b.x)*(c.x-b.x)/(4*c.r)); if(b.r>c.r) s.pop(); else break; } s.push(b); cout<<fixed<<setprecision(3)<<b.r<<'\n'; } return 0; }
#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...