Submission #1131648

#TimeUsernameProblemLanguageResultExecution timeMemory
1131648monostackBalloons (CEOI11_bal)C++20
10 / 100
280 ms2528 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define ld long double int32_t main(){ cout<<fixed<<setprecision(3); int n; cin>>n; vector<long double> ans; stack<pair<int,long double>> ms; for(auto i = 0; i < n; i++){ int x,r; cin>>x>>r; ld r_ = r; while(ms.size()){ r_ = ((ld)(x - ms.top().first)*(ld)(x - ms.top().first))/((ld)4*ms.top().second); if(r_ <= r) ms.pop(); else break; } ms.push({x,min((ld)r,r_)}); cout<<min((ld)r,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...