Submission #464025

#TimeUsernameProblemLanguageResultExecution timeMemory
464025dutchBalloons (CEOI11_bal)C++17
20 / 100
217 ms6316 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__; const int LIM = 2e5; int n, x[LIM], st[LIM+1], *p = st; double y[LIM]; signed main(){ cin >> 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], ((x[*p]-x[i]) * (x[*p]-x[i]))/(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...