#include using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using pii = pair; using vi = vector; using vll = vector; double distance(double x1, double x2, double y1, double y2) { return sqrtf(pow(x1 - y1, 2) + pow(x2 - y2, 2)); } pair midpoint(double x1, double x2, double y1, double y2) { pair pt; pt.first = x1 + (y1 - x1) / 2; pt.second = x2 + (y2 - x2) / 2; return pt; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); pii a, b, c; cin >> a.first >> a.second >> b.first >> b.second >> c.first >> c.second; double best = numeric_limits::max(); // 3 lines double dist, r; pair mid; // AB mid = midpoint(a.first, a.second, b.first, b.second); r = distance(a.first, a.second, b.first, b.second) / 2; dist = distance(mid.first, mid.second, c.first, c.second); if (dist >= r) best = min(best, dist - r); else best = min(best, r - dist); //cout << best << endl; // AC mid = midpoint(a.first, a.second, c.first, c.second); r = distance(a.first, a.second, c.first, c.second) / 2; dist = distance(mid.first, mid.second, b.first, b.second); if (dist >= r) best = min(best, dist - r); else best = min(best, r - dist); //scout << best << endl; // BC mid = midpoint(b.first, b.second, c.first, c.second); r = distance(b.first, b.second, c.first, c.second) / 2; dist = distance(mid.first, mid.second, a.first, a.second); if (dist >= r) best = min(best, dist - r); else best = min(best, r - dist); //cout << best << endl; cout << best << endl; }