Submission #1186764

#TimeUsernameProblemLanguageResultExecution timeMemory
1186764North1304Balloons (CEOI11_bal)C++20
50 / 100
2095 ms2896 KiB
#include <bits/stdc++.h> using namespace std; vector<pair<long long, long double>> vec; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; for (int i=1;i<=n;i++) { long long x,r; cin >> x >> r; long double ans = r; for (auto [xx,rr]:vec) { long double now = (x - xx) * (x - xx); now /= 4.00 * rr; ans = min(ans, now); } vec.push_back({x, ans}); cout << fixed << setprecision(3) << ans << '\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...