[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() ...
随机推荐
- 基于Tesseract组件的OCR识别
基于Tesseract组件的OCR识别 背景以及介绍 欲研究C#端如何进行图像的基本OCR识别,找到一款开源的OCR识别组件.该组件当前已经已经升级到了4.0版本.和传统的版本(3.x)比,4.0时代 ...
- Python异常代码含义对照表
Python常见的异常提示及含义对照表如下: 异常名称 描述 BaseException 所有异常的基类 SystemExit 解释器请求退出 KeyboardInterrupt 用户中断执行(通常是 ...
- SphereEx 获数百万美元天使融资,接力 ShardingSphere 开启 Database Plus 新篇章
5月14日,数据前沿技术领域初创公司 SphereEx 获得来自红杉中国种子基金.初心资本的数百万美元天使轮融资. SphereEx是一家致力于构建新型分布式数据基础设施的公司,秉承开源.共享.生态. ...
- 题解 Hero meet devil
题目传送门 题目大意 给出一个长度为 \(n\) 的字符串,对于每个 \(k\in [0,n]\),求出有多少个长度为 \(m\) 的字符串满足两者最长公共子序列长度为 \(k\). \(n\le 1 ...
- gin 源码阅读(5) - 灵活的返回值处理
gin 源码阅读系列文章列表: gin 源码阅读(1) - gin 与 net/http 的关系 gin 源码阅读(2) - http请求是如何流入gin的? gin 源码阅读(3) - gin 路由 ...
- part1 软件测试基础知识面试题(含答案)
1.你的测试职业发展是什么? 测试经验越多,测试能力越高.所以我的职业发展是需要时间积累的,一步步向着高级测试工程师奔去.而且我也有初步的职业规划,前3年积累测试经验,按如何做好测试工程师的要点去要求 ...
- API代码实战
API实例一: login.py文件 #!/usr/bin/env python #!coding:utf-8 from flask import Flask,jsonify from flask_r ...
- 初学Python-day8 案例2
中奖率 1 import random 2 num = 123456 3 i = 1 4 while True: 5 win = random.randrange(100000, 999999) 6 ...
- 【UE4 设计模式】享元模式 Flyweight Pattern
概述 描述 运用共享技术有效地支持大量细粒度对象的复用.系统只使用少量的对象,而这些对象都很相似,状态变化很小,可以实现对象的多次复用. 由于享元模式要求能够共享的对象必须是细粒度对象,因此它又称为轻 ...
- UltraSoft - Beta - Scrum Meeting 2
Date: May 18th, 2020. Scrum 情况汇报 进度情况 组员 负责 今日进度 q2l PM.后端 建立Beta仓库管理增加服务器部署和Git协作文档 Liuzh 前端 查阅响应式布 ...