Submission #482372

#TimeUsernameProblemLanguageResultExecution timeMemory
482372chungdinhBalloons (CEOI11_bal)C++17
50 / 100
2094 ms2220 KiB
#include <cstdio> #include <vector> #include <queue> #include <map> #include <set> #include <algorithm> #include <iostream> #include <cstring> using namespace std; #define ll long long #define ii pair<int, int> #define FOR(i, l, r) for (int i = (l); i <= (r); i++) #define all(x) x.begin(), x.end() const int N = 5e5 + 5; const ll MOD = 998244353; int n; pair<long double, long double> a[N]; long double z[N]; int main() { #ifdef CHUNGDINH freopen("main.inp","r",stdin); #endif // CHUNGDINH cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i].first >> a[i].second; long double tt = a[i].second; for (int j = i - 1; j >= 1; j--) tt = min(tt, (a[i].first - a[j].first) * (a[i].first - a[j].first) / 4 / z[j]); z[i] = tt; printf("%.3Lf\n", z[i]); } }
#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...