Submission #924845

#TimeUsernameProblemLanguageResultExecution timeMemory
924845VMaksimoski008Balloons (CEOI11_bal)C++14
60 / 100
2047 ms4232 KiB
#include <bits/stdc++.h> #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() //#define int long long using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; const int mod = 1e9 + 7; const int LOG = 20; const int maxn = 1e5 + 5; const double eps = 1e-9; int32_t main() { 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...