#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; constexpr double EPS = 1e-9; constexpr double PI = 2.0 * acos(0.0); struct PT { double x, y; double length() { return sqrt(x * x + y * y); } int normalize() { double l = length(); if (fabs(l) < EPS) { return -1; } x /= l; y /= l; return 0; } PT operator-(PT a) { PT r; r.x = x - a.x; r.y = y - a.y; return r; } PT operator+(PT a) { PT r; r.x = x + a.x; r.y = y + a.y; return r; } PT operator*(PT a) { PT r; r.x = x * a.x; r.y = y * a.y; return r; } PT operator*(double num) { PT r; r.x = x * num; r.y = y * num; return r; } PT operator/(double num) { PT r; r.x = x / num; r.y = y / num; return r; } double dist(PT other) { return hypot(x - other.x, y - other.y); } }; PT intersect(PT A, PT B, PT C, PT D) { double d =(D.y, C.y) * (B.x - A .x) - (D.x - C.x) * (B.y - A .y); if (fabs(d) < EPS) throw 1; double ua,ub; ua = (D.x - C.x * (A.y - C.y)) - (D.x -C.y) * (A.x-C.x); ua /= d; return A + (B - A) * ua; } double trap(PT a, PT b) { return (0.5 * (b.x - a.x) * (b.y + a.y)); } double triarea(PT a, PT b, PT c) { return fabs(trap(a, b) + trap(b, c) + trap(c, a)); } PT closestpt(PT p1, PT p2, PT other) { if (fabs(triarea(p1, p2, other)) < EPS) { return other; } PT v = p2 - p1; v.normalize(); double pr; pr = (other.y - p1.y) * v.y + (other.x - p1.x) * v.x; return p1 + v * pr; } double calc(PT l1, PT l2, PT p) { PT mid = l1 + (l2 - l1) / 2; double r = l1.dist(mid); return std::abs(mid.dist(p) - r); } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); PT a, b, c; cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y; double dist = numeric_limits::max(); dist = std::min(dist, calc(a, b, c)); dist = std::min(dist, calc(b, a, c)); dist = std::min(dist, calc(a, c, b)); dist = std::min(dist, calc(c, a, b)); dist = std::min(dist, calc(b, c, a)); dist = std::min(dist, calc(c, b, a)); cout << setprecision(12) << dist << endl; return 0; }