叉积三角形面积

struct point {
    ll x, y;

    point operator-(const point &a) const {
        return {x - a.x, y - a.y};
    }
} a, b, c;

ll s(point a, point b) {
    return abs(a.x * b.y - a.y * b.x) / 2;
}
发布了156 篇原创文章 · 获赞 20 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/Cymbals/article/details/96442138