UVa 11524 - In-Circle
来源:互联网 发布:郭靖黄蓉爱情知乎 编辑:程序博客网 时间:2024/06/05 08:57
不需要算法,几何计算题。方法如同Ac_coral http://www.cnblogs.com/Accoral/p/3142038.html
/************************************************************************* > File Name: UVa11524.cpp > Author: AcToy > Mail: ycsgldy@163.com > Created Time: 2013年07月20日 星期六 09时26分36秒 ************************************************************************/#include <algorithm>#include <iostream>#include <cstring>#include <cstdlib>#include <climits>#include <cstdio>#include <string>#include <vector>#include <queue>#include <cmath>#include <stack>#include <map>#include <set>using namespace std;typedef unsigned int u32;typedef long long i64;typedef unsigned long long u64;typedef vector<int> IV;typedef vector<bool> BV;typedef pair<int,int> II;typedef vector<II> IIV;#define For(t,v,c) for(t::const_iterator v=c.begin(); v!=c.end(); ++v)const int INF = 0x7FFFFFFF;const double eps = 1E-10;const double PI = acos(-1);int main() {int Case;double R, m1, n1, m2, n2, m3, n3, x;scanf("%d", &Case);while(Case--) {scanf("%lf", &R);scanf("%lf%lf%lf%lf%lf%lf", &m1, &n1, &m2, &n2, &m3, &n3);double tmp1 = n1 / m1, tmp2 = m3 / n3;double ang1 = acos((tmp1 + tmp2 + 1 - tmp1 * tmp2) / ((tmp1 + 1) * (tmp2 + 1)));double ang2 = ang1 / 2;double x = R / tan(ang2);double C = x * 2 + 2 * x * n1 / m1 + 2 * x * m3 / n3;printf("%.4lf\n", R * C / 2);} return 0;}
- UVa 11524 - In-Circle
- POINT IN CIRCLE 题解
- Piont in a circle
- Circle in Square LightOJ
- Face in Circle
- LightOJ 1022 Circle in Square
- soj 1621. Circles in Circle
- Changsha F Curve in Circle
- LightOj-1022-Circle in Square
- UVa 10432 - Polygon Inside A Circle
- UVa 190 - Circle Through Three Points
- UVa 438 - The Circumference of the Circle
- uva 190 Circle Through Three Points
- UVA-438- The Circumference of the Circle
- uva 438 The Circumference of the Circle
- uva 190 Circle Through Three Points
- circle ``
- Circle
- Oracle Database 11g Release 2 RAC On Oracle Linux 5.8 Using VirtualBox
- Trie树的双数组实现
- v6eval编译问题
- hdu1596 find the safest road
- String和StringBuffer的区别
- UVa 11524 - In-Circle
- hdu2444 判断二分图+最大匹配
- 认清营销、销售和广告的庐山真面目
- css和js的浏览器不兼容问题汇总
- I2C总线原理及应用实例
- WPS设置首字母自动大写转换
- c语言要点摘录(21~24 数组与指针-上)
- 64位时间戳实现
- 游戏数据的捕捉(郁金香学习笔记)