9 条题解
-
-6
#include <stdio.h> #include #include <math.h> using namespace std; int main() { double x1,x2,x3,y1,y2,y3; double a, b, c, p, s; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; a = sqrt( (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); b = sqrt( (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)); c = sqrt( (x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2)); p = (a + b + c) / 2; s = sqrt(p * (p - a) * (p - b) * (p -c)); printf("%.2lf",s); }
信息
- ID
- 825
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 3
- 标签
- 递交数
- 436
- 已通过
- 231
- 上传者