#include using namespace std; #define rep(i, a, n) for (int i=(a); i < (n); i++) #define per(i, a, n) for (int i=(n)-1; i >= (a); i--) #define FOR(i, n) for (int i=0; i Bod; vector pts; bool nalevo(Bod a, Bod b, Bod c) { pair v = {a.fi - b.fi, a.se - b.se}, w = {c.fi - b.fi, c.se - b.se}; return v.fi * w.se - v.se * w.fi <= 0; } double NEKONECNO = 1e100; double fce(double x0, double y0, double tang) { double a = (x0 + y0 / tang); double b = (y0 + x0 * tang); return sqrt(a * a + b * b); } void solve(void) { pts = {}; int mup=0, mright=0; FOR(i, N){ int a, b; scanf("%d %d", &a, &b); pts.push_back({a, b}); mup = max(b, mup); mright = max(a, mright); } sort(pts.begin(), pts.end()); pts.push_back({mright, 0}); vector > q = {{0, mup}}; for (auto p: pts){ while (q.size() >= 2 && nalevo(p, q[q.size() - 2], q[q.size() - 1])) q.pop_back(); q.push_back(p); } pts = q; double res = NEKONECNO; for (int i=1; i fce(p.fi, p.se, g)) c = f; else d = g; } res = min(res, fce(p.fi, p.se, c)); } printf("%.5f\n", res); } int main(void) { while (scanf("%d", &N) == 1) solve(); return 0; }