1849 简单的求面积问题


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

学计算机数学总是必须的,关于几何的一些基本知识也就很必要知道的。。。 给你4个二维坐标的点a,b,c,d,请求出ab,bc,cd,da四条线段所连成的图像的面积,精确到小数点后2位。

Input

多组数据,每组8个整数ax,ay,bx,by,cx,cy,dx,dy,每个数都在0到1000范围内

Output

ab,bc,cd,da四条线段所连成的图像的面积,精确到小数点后2位

Sample

Input

0 0 1 0 1 1 0 1
0 0 1 1 0 1 1 0

Output

1.00
0.50

Source: Y.uan


Comments

There are no comments at the moment.