hdu 5858 正方形和内切圆的几何问题
来源:互联网 发布:北京理工大学网络登录 编辑:程序博客网 时间:2024/06/03 06:40
Problem Description
cjj is fun with math problem. One day he found a Olympic Mathematics problem for primary school students. It is too difficult for cjj. Can you solve it?
Give you the side length of the square L, you need to calculate the shaded area in the picture.
The full circle is the inscribed circle of the square, and the center of two quarter circle is the vertex of square, and its radius is the length of the square.
Give you the side length of the square L, you need to calculate the shaded area in the picture.
The full circle is the inscribed circle of the square, and the center of two quarter circle is the vertex of square, and its radius is the length of the square.
Input
The first line contains a integer T(1<=T<=10000), means the number of the test case. Each case contains one line with integer l(1<=l<=10000).
Output
For each test case, print one line, the shade area in the picture. The answer is round to two digit.
Sample Input
11
Sample Output
0.29
有关扇形的补充公式:
弧长:l=αr
扇形的面积:s=(1/2)lr
#include<cmath>#include<iostream>#include<cstdio>#include<cstring>#include<string>#include<algorithm>#define inf 0x3f3f3f3f#define ll long longusing namespace std;const double pi=3.1415926;int main(){ int T; cin>>T; while(T--) { int l; cin>>l; double s=(asin(1.0*sqrt(14)/4)/4-asin(1.0*sqrt(14)/8)+1.0*sqrt(7)/8)*l*l*2; printf("%0.2f\n",s); } return 0;}
1 0
- hdu 5858 正方形和内切圆的几何问题
- 【几何---正方形覆盖】hdu 4007
- 求三角形的外接圆和内切圆
- 三角形的内切圆和外接圆半径公式
- 三角形的内切圆和外接圆--【英雄会】
- HDU 5733 tetrahedron(几何——四面体内心/体积/内切圆)
- HDU-正方形棋盘覆盖问题
- 等内切圆问题
- hdu 5206 Four Inages Strategy【计算几何】【判断空间正方形】
- hdu 5533 计算几何 判断是否为正方形
- uva 11524 InCircle 内切圆(计算几何)
- POJ 3525(计算几何+凸多边形最大内切圆)
- C语言平面几何18-三角形的内心和内切圆
- C语言平面几何18-三角形的内心和内切圆
- 使用GeoGebra绘制三角形的外接圆和内切圆
- 三角形内切圆的半径
- POJ2002Squares【求点集中正方形的个数 计算几何+Hash】
- 几何画板演示正方形拼凑过程的教程
- Office下载记录
- 2MULTI-DIMENSIONAL SIGNAL PROCESSING AND CIRCUITS FOR ADVANCED ELECTRONICALLY SCANNED ANTENNA ARRAYS
- iOS程序启动过程,原理,UIApplication,代码启动界面 - iOS
- ubuntu1404与win7相互远程桌面
- Ubuntu linux 添加动态链接库路径
- hdu 5858 正方形和内切圆的几何问题
- CSU 1111: 三家人【有趣的思维题】
- 网页放在WEB-INF下面怎样发布访问
- WebView的简单学习20160820
- Spring MVC Fast Tutorial: Model View Controller
- Qt中pro文件的详细介绍
- 玲珑学院-1014-Absolute Defeat【思维】
- Arithmetic problem | 统计前面比自己小的数的个数
- Java并发编程番外篇(二)happens-before关系