#include #include using namespace std; struct Point { double x, y; Point(double x, double y) : x(x), y(y) {} Point &operator+=(Point p) { x += p.x; y += p.y; return *this; } Point &operator-=(Point p) { x -= p.x; y -= p.y; return *this; } Point operator+(Point p) { return Point(*this) += p; } }; double Area(Point a, Point b, Point c) { a -= c; b -= c; return abs((a.x * b.y - a.y * b.x) / 2.0); } int main() { int x1, y1, x2, y2, x3, y3; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; Point p1(x1, y1), p2(x2, y2), p3(x3, y3); vector dp; dp.emplace_back(1, 0); dp.emplace_back(-1, 0); dp.emplace_back(0, 1); dp.emplace_back(0, -1); double res = 0.0; for (auto d1 : dp) { for (auto d2 : dp) { for (auto d3 : dp) { auto pp1 = p1 + d1; auto pp2 = p2 + d2; auto pp3 = p3 + d3; res = max(res, Area(pp1, pp2, pp3)); } } } cout << res << endl; return 0; }