ZOJ 1090-The Circumference of the Circle
来源:互联网 发布:java得到当前系统时间 编辑:程序博客网 时间:2024/05/20 18:55
需要用到数学知识。。然而我都忘了。。于是搜了解题报告
在圆的内接三角形的性质中有这样一条:三角形的任何两边的乘积的等于第三边上的高于其外接圆直径的乘积
求面积可以用海伦公式:S=sqrt(p*(p-a)*(p-b)*(p-c)),其中p=(a+b+c)/2
#include<stdio.h>#include<math.h>#define pi 3.141592653589793double dis(double x,double y){ return sqrt(x*x+y*y);}int main(){ double x1,y1,x2,y2,x3,y3; while(~scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3)) { double d1,d2,d3; double p,h,d,c; d1=dis(x1-x2,y1-y2); d2=dis(x1-x3,y1-y3); d3=dis(x2-x3,y2-y3); p=(d1+d2+d3)/2; h=sqrt(p*(p-d1)*(p-d2)*(p-d3))*2/d3; d=d1*d2/h; c=pi*d; printf("%.2lf\n",c); } return 0;}
0 0
- zoj 1090 The Circumference of the Circle
- zoj 1090 The Circumference of the Circle
- ZOJ 1090-The Circumference of the Circle
- zoj 1090 || poj 2242 The Circumference of the Circle
- php - zoj 1090 The Circumference of the Circle
- TOJ 1132 ZOJ 1090 The Circumference of the Circle
- POJ 2242|ZOJ 1090 The Circumference of the Circle
- The Circumference of the Circle
- pku2242The Circumference of the Circle
- zoj 1090 The Circumference of the Circle(海伦公式+正弦定理)
- ZOJ 1090 The Circumference of the Circle(计算三角形的外接圆)
- zoj1090 The Circumference of the Circle
- ZOJ1090 The Circumference of the Circle
- POJ 2242 The Circumference of the Circle
- poj 2242 The Circumference of the Circle
- HOJ 1439 The Circumference of the Circle
- UVa 438 - The Circumference of the Circle
- hdu 1374 The Circumference of the Circle
- 终极Shell---zsh
- java 继承
- 用C++实现WebGIS
- POJ - 1724 ROADS
- mybatis多个参数传值
- ZOJ 1090-The Circumference of the Circle
- Android Service完全解析,关于服务你所需知道的一切(上)
- 设计模式之iterator
- Oracle shared server配置
- C++基础<04>—标准库vector类型
- chrome有个http请求报文生成插件叫postman ,这插件在http服务接口调试时非常实用
- OpenBR
- Android 6.0 Marshmallow 通知栏中QuickSetting分析
- TDLS应用与协议