[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() ...
随机推荐
- Linux Bash命令杂记(tr col join paste expand)
Linux Bash命令杂记(tr col join paste expand) tr命令 tr命令可以将输入的数据中的某些字符做替换或者是作删除 tr [-ds] STR d: 删除输入数据的中的S ...
- 学习使用SignalR
1.创建空白的控制台程序 2.添加两个NuGet包(Microsoft.AspNet.SignalR.SelfHost.Microsoft.Owin.Cors.Topshelf)Topshelf用于快 ...
- Redis大集群扩容性能优化实践
一.背景 在现网环境,一些使用Redis集群的业务随着业务量的上涨,往往需要进行节点扩容操作. 之前有了解到运维同学对一些节点数比较大的Redis集群进行扩容操作后,业务侧反映集群性能下降,具体表现在 ...
- 经典论文系列 | 缩小Anchor-based和Anchor-free检测之间差距的方法:自适应训练样本选择
前言 本文介绍一篇CVPR2020的论文,它在paperswithcode上获得了16887星,谷歌学术上有261的引用次数. 论文主要介绍了目标检测现有的研究进展.anchor-based和 ...
- 【UE4】异步加载关卡 LoadingScreen ( 蓝图和C++ )
一般先跳转到一个临时的关卡,然后异步加载目标关卡,同时展示Loading界面 对于含有流关卡的目标关卡,可以先载入子关卡 蓝图异步加载 无进度条 C++ 异步加载关卡 LoadPackageAsync ...
- BUAA_2020_软件工程_软件案例分析作业
项目 内容 这个作业属于那个课程 班级博客 这个作业的要求在哪里 作业要求 我在这个课程的目标是 学习掌握软件工程的相关知识 这个作业在哪个具体方面帮我实现目标 通过对具体软件案例的分析学习软件工程 ...
- TensorFlow从入门到入坑(2)
TensorFlow学习(2) 一.jupyter notebook的安装和使用 1. 什么是jupyter notebook jupyter notebook(http://jupyter.org/ ...
- Atcoder 题目泛做
我思维越来越菜了,这样下去感觉要退役了. 听说Atcoder的题练思维?那就试着做一做吧. 坚持每天一两道吧.(很有可能咕掉.) AGC036 官方题解 ---A-Triangle ...
- js this指向汇总
this指向 普通函数 window 定时器函数 window 事件函数 事件源 箭头函数 父function中的this,没有就是window 对象函数 对象本身 构造函数 实例化 ...
- 中文NER的那些事儿4. 数据增强在NER的尝试
这一章我们不聊模型来聊聊数据,解决实际问题时90%的时间其实都是在和数据作斗争,于是无标注,弱标注,少标注,半标注对应的各类解决方案可谓是百花齐放.在第二章我们也尝试通过多目标对抗学习的方式引入额外的 ...