2 条题解
-
1
#include <bits/stdc++.h> using namespace std; int main() { double x1, y1, x2, y2, x3, y3; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; double r1 = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); double r2 = sqrt((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1)); double r3 = sqrt((x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3)); double p = (r1 + r2 + r3) / 2.0; double s = sqrt(p * (p - r1) * (p - r2) * (p - r3)); printf("%.2f", s); return 0; }
- 1
信息
- ID
- 4481
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 1
- 标签
- (无)
- 递交数
- 86
- 已通过
- 59
- 上传者