UVA - 11646 - Athletics Track (计算几何~)
2015-02-10 23:06
351 查看
题目地址:点这里
思路:计算几何入门题,首先,两个圆弧是同一个圆的,所以这个圆是矩形的外接圆,那么矩形中心就是圆心,由长宽算出角度和半径(这时用单位长度表示),再算出一个单位长度的实际长度,从而得出长和宽
AC代码:
思路:计算几何入门题,首先,两个圆弧是同一个圆的,所以这个圆是矩形的外接圆,那么矩形中心就是圆心,由长宽算出角度和半径(这时用单位长度表示),再算出一个单位长度的实际长度,从而得出长和宽
AC代码:
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <cmath> using namespace std; int main() { double a, b, le, wi, tmp; int cas = 1; while(scanf("%lf : %lf", &a, &b) != EOF) { double ang = 2 * atan(b / a); //根据长和宽的比算出角度 double r = sqrt(a * a + b * b) / 2; //算出半径的单位长度 double hu = r * ang; //算出弧的单位长度 double Unit_length = 200.0 / (hu + a); //算出单位长度的实际长度 le = a * Unit_length, wi = b * Unit_length; //求长和宽的实际长度 printf("Case %d: %.10lf %.10lf\n", cas++, le, wi); } return 0; }
相关文章推荐
- UVA 11646 - Athletics Track(计算几何)
- 简单几何(推公式) UVA 11646 Athletics Track
- UVa 11646 - Athletics Track(几何)
- Athletics Track - UVa 11646 几何
- uva 11646 - Athletics Track(几何)
- UVA 11646 - Athletics Track || UVA 11817 - Tunnelling the Earth 几何
- UVA 11646 - Athletics Track || UVA 11817 - Tunnelling the Earth 几何
- UVALive 4426 Blast the Enemy! 计算几何求重心
- UVA-1331 Minimax Triangulation 区间dp 计算几何 三角剖分 最大三角形最小化
- UVALive 7749 Convex Contour (计算几何)
- UVA 1331 Minimax Triangulation [最优三角剖分] [dp] [计算几何]
- UVA 11646 || Athletics Track(圆心角乘半径 = 弧长
- UVa 1643 Angle and Squares (计算几何)
- 入门题 UVA 11646 Athletics Track
- UVA 3905 计算几何<扫描法> <求一条线与矩形的交>
- uva 11646 几何水题
- UVA 438 - The Circumference of the Circle(计算几何)
- UVA 12301 - An Angular Puzzle(计算几何)
- POj 2002 UVALive - 3047 C - Squares 【计算几何+二分求解】
- 计算几何专项:UVa 12301