제출 #1131655

#제출 시각아이디문제언어결과실행 시간메모리
1131655monostackBalloons (CEOI11_bal)C++20
30 / 100
173 ms5092 KiB
#include<bits/stdc++.h> using namespace std; #define ld long double int main(){ cout<<fixed<<setprecision(3); int n; cin>>n; vector<ld> ans(n); stack<pair<ld,ld>> ms; for(auto i = 0; i < n; i++){ ld x,r; cin>>x>>r; ld r_ = r; while(!ms.empty()){ pair<ld,ld> l = ms.top(); ld d = (((ld)(x - l.first)*(ld)(x - l.first))/((ld)4*(ld)(l.second))); r_ = min(d,r_); if(d >= l.second) ms.pop(); else break; } ms.push({x,r_}); ans[i] = ms.top().second; } for(ld&r:ans) cout<<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...