[nowcoder5667K]Keyboard Free

1 #include<bits/stdc++.h>
2 using namespace std;
3 #define pi acos(-1.0)
4 int t,r1,r2,r3;
5 double sqr(double a){
6 return a*a;
7 }
8 double f(double a){
9 double l=sqrt(sqr(r2*cos(a)-r1)+sqr(r2*sin(a)));
10 double h=r1*r2*sin(a)/l;
11 double b=asin(h/r3);
12 return l*(b*h+cos(b)*r3)/pi;
13 }
14 int main(){
15 scanf("%d",&t);
16 while (t--){
17 scanf("%d%d%d",&r1,&r2,&r3);
18 if (r1>r2)swap(r1,r2);
19 if (r1>r3)swap(r1,r3);
20 if (r2>r3)swap(r2,r3);
21 double ans=0;
22 for(int i=1;i<=1000;i++)ans+=f(2*i*pi/1000.0)/1000.0;
23 printf("%.1f\n",ans);
24 }
25 }
[nowcoder5667K]Keyboard Free的更多相关文章
- Fedora 22中的Locale and Keyboard Configuration
Introduction The system locale specifies the language settings of system services and user interface ...
- android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
<activity android:name="xxxActivity" android:configChanges="keyboard|keyboardHidde ...
- USB Keyboard Recorder
catalogue . 引言 . Device Class Definition for Human Interface Devices (HID) . USB HID Report Descript ...
- imx6 matrix keyboard
imx6需要添加4x4的矩阵键盘.本文记录添加方法. 参考链接 http://processors.wiki.ti.com/index.php/TI-Android-JB-PortingGuide h ...
- Codeforces Round #389 Div.2 B. Santa Claus and Keyboard Check
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...
- UVa 11998 Broken Keyboard (数组模拟链表问题)
题目链接: 传送门 Broken Keyboard #include<bits/stdc++.h> using namespace std; char str[100010]; int m ...
- vimium Keyboard Bindings
Modifier keys are specified as `<c-x>`, `<m-x>`, and `<a-x>` for ctrl+x, meta+x, a ...
- UVa 11988 Broken Keyboard(链表->数组实现)
/*数组形式描述链表:链表不一定要用指针. 题目链接:UVa 11988 Broken Keyboard 题目大意: 小明没有开屏幕输入一个字符串,电脑键盘出现了问题会不定时的录入 home end ...
- 6754 Keyboard of a Mobile Telephone
/*实践再次说明ch=getchar()的速度非常慢*/ /*大水题,不解释*/ #include<stdio.h> #include<string.h> int main() ...
随机推荐
- vue 中级基础考察面试题
vue 生命周期有哪些 beforeCreate created beforeMount mounted beforeUpdate updated activated deactivated befo ...
- js 判断两个对象是否相等
最近碰到的一个面试题,不算高频,记录一下 判断两个对象是否相等,大致分为三步 首先判断两个比较对象是不是 Object 如果都是对象 再比较 对象的长度是否相等 如果两个对象的长度相等 再比较对象属性 ...
- Java初步学习——2021.10.09每日总结,第五周周六
(1)今天做了什么: (2)明天准备做什么? (3)遇到的问题,如何解决? 今天学习了菜鸟教程实例部分 一.字符串 1.字符串比较--compareTo方法 public class Main { p ...
- spoj839 Optimal Marks(最小割,dinic)
题目大意: 给你一个无向图\(G(V,E)\). 每个顶点都有一个int范围内的整数的标记. 不同的顶点可能有相同的标记. 对于边\((u,v)\),我们定义\(Cost(u,v)=mark [u]\ ...
- Markdown数学公式
1. 显示位置与大小 正文(inline)中的LaTeX公式用$...$定义, 显示在当前行内. $\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t$ \(\sum_{i ...
- SpringCloud微服务实战——搭建企业级开发框架(二):环境准备
这里简单说明一下在Windows系统下开发SpringCloud项目所需要的的基本环境,这里只说明开发过程中基础必须的软件,其他扩展功能(Docker,k8s,MinIO,XXL-JOB,EKL,Ke ...
- 这样学BAT必面之软件设计原则,还不会就是我的问题
学习设计原则是学习设计模式的基础.在实际开发过程中,并不要求所有代码都遵循设计原则,我们要考虑人力.时间.成本.质量,不能刻意追求完美,但要在适当的场景遵循设计原则,这体现的是一种平衡取舍,可以帮助我 ...
- .Net2.0连接PG数据注意事项
.Net2.0连接PG数据注意事项 第一次用.net操作PG[.NET2.0] 一:Npgsql版本问题 1:如果是.net2.0 建议用2.0.11.0[NuGet搜索npgsql第一个的最低版本 ...
- spring security中ajax超时处理
spring security为我们的系统提供了方便的认证和授权操作.在系统中完成认证和授权后,一般页面页面上大多数是ajax和后台进行操作,那么这个时候可能就会面临session超时,ajax去访问 ...
- 利用pyplot绘制sin(x)和cos(x)的组合图像
一.实验目标 (1) 掌握numpy库的使用 (2) 掌握matplotlib库的使用 (3) 掌握pyplot的基本函数和方法 二.实验内容 import matplotlib.pyla ...