Submission #924841

#TimeUsernameProblemLanguageResultExecution timeMemory
924841VMaksimoski008Balloons (CEOI11_bal)C++14
0 / 100
2043 ms6880 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(3) << fixed; vector<pdd> v(n); for(pdd &x : v) cin >> x.first >> x.second; for(int i=0; i<n; i++) { for(int j=0; j<i; j++) v[i].second = min(v[i].second, (v[j].first + v[i].first) * (v[j].first + v[i].first) / (4 * v[j].second)); 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...