Submission #464024

#TimeUsernameProblemLanguageResultExecution timeMemory
464024dutchBalloons (CEOI11_bal)C++17
100 / 100
165 ms5132 KiB
#include <bits/stdc++.h> using namespace std; struct readInt{ readInt& operator>>(int &I){ char J = I = 0; while(J < 48) J = getchar_unlocked(); while(J > 47) I = I * 10 + J - 48, J = getchar_unlocked(); return *this; } #define cin __read__ } __read__; signed main(){ int n; cin >> n; int x[n], st[n+1], *p = st; double y[n]; cout << fixed << setprecision(4); for(int i=0, j; i<n; ++i){ cin >> x[i] >> j; y[i] = j; while(p != st){ y[i] = min(y[i], pow(x[*p]-x[i], 2)/(4.0*y[*p])); if(y[*p] < y[i]) --p; else break; } cout << y[*(++p) = i] << '\n'; } }
#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...