博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
简单几何(推公式) UVA 11646 Athletics Track
阅读量:6938 次
发布时间:2019-06-27

本文共 1018 字,大约阅读时间需要 3 分钟。

 

题意:给了长宽比例,操场一圈400米,问原来长宽的长度

分析:推出公式

 

/************************************************* Author        :Running_Time* Created Time  :2015/10/22 星期四 15:19:59* File Name     :UVA_11646.cpp ************************************************/#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;#define lson l, mid, rt << 1#define rson mid + 1, r, rt << 1 | 1typedef long long ll;const int N = 1e5 + 10;const int INF = 0x3f3f3f3f;const int MOD = 1e9 + 7;const double EPS = 1e-10;int main(void) { int l, w, cas = 0; while (scanf ("%d : %d", &l, &w) == 2) { double a = w * 1.0 / l; double rad = atan (a); double L = 200.0 / (1 + rad * a / sin (rad)); double W = a * L; printf ("Case %d: %.10f %.10f\n", ++cas, L, W); } return 0;}

  

转载于:https://www.cnblogs.com/Running-Time/p/4901292.html

你可能感兴趣的文章
创新型服务“场景串接”——互联网平台建设
查看>>
鲸仓科技获7500万元B+轮融资,旷视科技领投、百度风投跟投
查看>>
IT专家们谈OpenStack和Kubernetes的未来
查看>>
jQuery Ajax 操作函数及deferred对象
查看>>
Eclipse 开发配置
查看>>
IDEA快捷键快速查看跳转当前类的方法
查看>>
Oracle Internal Event:10200 Consistent Read诊断事件
查看>>
正则表达式校验IP地址
查看>>
Exchange 常见问题之二----5
查看>>
Linux学习网站
查看>>
CentOS防火墙iptables的配置方法详解
查看>>
puppet客户端取消主动更新
查看>>
redis 3.0.7 安装部署
查看>>
微软职位内部推荐-Sr. SE - Office incubation
查看>>
如何查看mysql的用户及授权
查看>>
有趣的指针
查看>>
<Power Shell>新的征程
查看>>
使用FFmpeg新解码API解封装解码音视频(代码实例)
查看>>
【Android游戏开发之六】在SurfaceView中添加组件!!!!并且相互交互数据!!!!...
查看>>
Windows 服务器系统的服务概述和网络端口要求
查看>>