zoj1090
2013-02-28 10:25
155 查看
我想说,数学都忘完啦!
#include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { double x1,y1,x2,y2,x3,y3,a,b,c, sin, rel; while(scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3) != EOF) { a = pow(x1 - x2, 2.0) + pow(y1 - y2, 2.0);//求边长的 b = pow(x1 - x3, 2.0) + pow(y1 - y3, 2.0); c = pow(x2 - x3, 2.0) + pow(y2 - y3, 2.0); sin = sqrt (1 - pow(a + b - c, 2.0)/(4 * a * b)); rel = 3.141592653589793 * sqrt(c) / sin; printf("%.2lf\n", rel); } return 0; }
相关文章推荐
- ZOJ-1090
- zoj----1090---The Circumference of the Circle---数学几何
- POJ2242 HDU1374 ZOJ1090 UVA438 The Circumference of the Circle【三点连线切圆+圆的周长】
- zoj1090
- zoj 1090 The Circumference of the Circle(海伦公式+正弦定理)
- ZOJ 1090 The Circumference of the Circle(计算三角形的外接圆)
- zoj1090 The Circumference of the Circle
- POJ 2242|ZOJ 1090 The Circumference of the Circle
- ZOJ Problem Set - 1090 The Circumference of the Circle
- 两个几何水题ZOJ 1090 2540
- ZOJ1090 The Circumference of the Circle
- ZOJ 1090 The Circumference of the Circle
- ZOJ1090 The Circumference of the Circle
- zoj 1090 The Circumference of the Circle
- php - zoj 1090 The Circumference of the Circle
- zoj 1090 The Circumference of the Circle
- ZOJ-1090-The Circumference of the Circle(计算几何,海伦公式,三角形外接圆半径公式,cout输出小数的一些问题)
- ZOJ 1090 三点求圆周
- 【ACM打卡】ZOJ 1090
- ZOJ 1090 - The Circumference of the Circle 解题报告