不妨设$r1\le r2\le r3$,令$f(\alpha)=E(S_{\Delta}ABC)$,其中AB坐标分别为$(r_{1},0)$和$(r_{2}\cos \alpha,r_{2}\sin \alpha)$,C在原点为圆心、$r_{3}$为半径的圆上,那么有答案$ans=\lim_{n\to\infty}\limits\frac{\sum_{i=1}^{n}f(\frac{2\pi i}{n})}{n}$,而由于答案误差可以较大,因此n取1000左右即可
考虑求$f(\alpha)$,可以求出$l=|AB|=\sqrt{(r_{2}\cos\alpha-r_{1})^{2}+(r_{2}\sin \alpha)^{2}}$,作$CH\perp AB$交AB于点H,那么有$f(\alpha)=\frac{l\cdot E(CH)}{2}$
考虑求$E(CH)$,延长AB交最大的圆于点D,作$OE\verb|//|AB$交最大的圆于点E交CH延长线于点H',那么根据这些可以求出$\beta=\angle DOE=\angle ADO=\arcsin \frac{r_{1}r_{2}\sin\alpha}{r_{3}l}$,$h=HH'=r_{3}\sin\beta$,然后对$\gamma=\angle COA-\angle DOA$分类讨论:
1.$\beta\le \gamma< \pi+\beta$,那么$E(CH)=\begin{equation*}\int_{0}^{\pi} h+r_{3}\sin(\gamma-\beta)\  \rm d(\gamma-\beta)\end{equation*}=\pi h+2r_{3}$
2.$\pi+2\beta \le \gamma<2\pi$,那么$E(CH)=\begin{equation*}\int_{\beta}^{\pi-\beta} (r_{3}\sin (\gamma-\beta-\pi)-h)\  \rm d(\gamma-\beta-\pi)\end{equation*}=2r_{3}\cos\beta-(\pi-2\beta)h$
3.$0\le \gamma<\beta$或$\pi+\beta\le \gamma<\pi+2\beta$,那么$E(CH)=2\begin{equation*}\int_{0}^{\beta} (h-r_{3}\sin (\beta-\gamma))\  \rm d(\beta-\gamma)\end{equation*}=2\beta h+2r_{3}(\cos\beta-1)$
综上,$E(CH)=\frac{(\pi h+2r_{3})+(2r_{3}\cos\beta-(\pi-2\beta )h)+(2\beta h+2r_{3}(\cos\beta-1))}{2\pi}=\frac{2\beta h+2r_{3}cos\beta}{\pi}$,代入即可得到$f(\alpha)=\frac{l(\beta h+r_{3}\cos\beta)}{\pi}$

 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的更多相关文章

  1. Fedora 22中的Locale and Keyboard Configuration

    Introduction The system locale specifies the language settings of system services and user interface ...

  2. android:configChanges="keyboard|keyboardHidden|orientation|screenSize"

    <activity android:name="xxxActivity" android:configChanges="keyboard|keyboardHidde ...

  3. USB Keyboard Recorder

    catalogue . 引言 . Device Class Definition for Human Interface Devices (HID) . USB HID Report Descript ...

  4. imx6 matrix keyboard

    imx6需要添加4x4的矩阵键盘.本文记录添加方法. 参考链接 http://processors.wiki.ti.com/index.php/TI-Android-JB-PortingGuide h ...

  5. 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 ...

  6. UVa 11998 Broken Keyboard (数组模拟链表问题)

    题目链接: 传送门 Broken Keyboard #include<bits/stdc++.h> using namespace std; char str[100010]; int m ...

  7. vimium Keyboard Bindings

    Modifier keys are specified as `<c-x>`, `<m-x>`, and `<a-x>` for ctrl+x, meta+x, a ...

  8. UVa 11988 Broken Keyboard(链表->数组实现)

    /*数组形式描述链表:链表不一定要用指针. 题目链接:UVa 11988 Broken Keyboard 题目大意: 小明没有开屏幕输入一个字符串,电脑键盘出现了问题会不定时的录入 home end ...

  9. 6754 Keyboard of a Mobile Telephone

    /*实践再次说明ch=getchar()的速度非常慢*/ /*大水题,不解释*/ #include<stdio.h> #include<string.h> int main() ...

随机推荐

  1. PLSQL安装,PLSQL汉化,激活

    一)准备工作 1.点击下载PLSQL:https://www.allroundautomations.com/registered-plsqldev/.本次安装的是12.0.7,安装版本为64位 2. ...

  2. 手机淘宝轻店业务 Serverless 研发模式升级实践

    一.前言 随着 Serverless 在业界各云平台落地,阿里内部 Serverless 研发平台.各种研发模式也在业务中逐步落地,如火如荼.在此契机下,淘系团队启动了轻店 Serverless 研发 ...

  3. storm卡顿修改

    ​ 最近的webstorm越来越卡了,有时候甚至会弹出 Out of memory的窗口,提示要设置 xmx的值, 8G内存跑你这小软件还会不够用???要内存?给你,看你还会不会卡成翔! 于是果断给x ...

  4. 3DGIS开发使用的开源项目

    gdal proj4 vcglib assimp libjpg libpng osg libtess2 cesiumjs glm

  5. NX二次开发 克隆

    NXOpen.UF.UFSession theUfSession = NXOpen.UF.UFSession.GetUFSession(); try { //初始化 NXOpen.UF.UFClone ...

  6. 【数据结构与算法Python版学习笔记】算法分析

    什么是算法分析 算法是问题解决的通用的分步的指令的聚合 算法分析主要就是从计算资源的消耗的角度来评判和比较算法. 计算资源指标 存储空间或内存 执行时间 影响算法运行时间的其他因素 分为最好.最差和平 ...

  7. Java:AQS 小记-1(概述)

    Java:AQS 小记-1(概述) 概述 全称是 Abstract Queued Synchronizer(抽象队列同步器),是阻塞式锁和相关的同步器工具的框架,这个类在 java.util.conc ...

  8. springboot读取配置文件中的信息

    在一个项目中,我们有时候会把一些配置信息写入到一个配置文件中,在java代码中读取配置文件的信息.在此记录下读取属性文件中的内容. 在springboot项目中,springboot的配置文件可以使用 ...

  9. 深入理解和运用Pandas的GroupBy机制——理解篇

    GroupBy是Pandas提供的强大的数据聚合处理机制,可以对大量级的多维数据进行透视,同时GroupBy还提供强大的apply函数,使得在多维数据中应用复杂函数得到复杂结果成为可能(这也是个人认为 ...

  10. cf22A Second Order Statistics(STL-UNIQUE的使用)

    题意: N个数,找出第二大的数.如果没有输出-1. 思路: UNIQUE的使用. 代码: int a[105]; int n; int main(){ cin>>n; rep(i,0,n- ...