Submission #924846

#TimeUsernameProblemLanguageResultExecution timeMemory
924846VMaksimoski008Balloons (CEOI11_bal)C++14
60 / 100
2062 ms4152 KiB
#include <bits/stdc++.h> using namespace std; using pdd = pair<double, double>; int32_t main() { ios_base::sync_with_stdio(false); cout.tie(0); cin.tie(0); int n; cin >> n; cout << setprecision(5) << fixed; vector<pdd> v(n); for(pdd &x : v) cin >> x.first >> x.second; for(int i=0; i<n; i++) { double curr = v[i].second; for(int j=0; j<i; j++) curr = min(curr, (v[j].first - v[i].first) * (v[j].first - v[i].first) / (4 * v[j].second)); v[i].second = curr; cout << v[i].second << '\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...