Submission #441032

#TimeUsernameProblemLanguageResultExecution timeMemory
441032penguinhackerBalloons (CEOI11_bal)C++14
100 / 100
261 ms5452 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(3); int n; cin >> n; vector<pair<int, double>> v; while(n--) { int x; double r; cin >> x >> r; while(v.size()) { double dx=x-v.back().first; r=min(r, dx*dx/(4*v.back().second)); if (r>=v.back().second) v.pop_back(); else break; } cout << r << "\n"; v.emplace_back(x, r); } 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...