题目链接:http://codeforces.com/contest/1100/problem/C

题目大意:给你n和r,n指的是有n个圆围在里面的圆的外面,r指的是里面的圆的半径,然后让你求外面的圆的半径。

具体思路:,我们就可以列出等式,sin(2*pi/(2*n))=R/(R+r).

然后就直接解等式就可以了。

AC代码:

 #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace std;
# define ll long long
# define pi acos(-1.0)
const int maxn = 1e5+;
int main()
{
double n,r;
scanf("%lf %lf",&n,&r);
printf("%.8lf\n",sin(pi/(n))*r/(1.0-sin(pi/(n))));
return ;
}

C. NN and the Optical Illusion(几何)的更多相关文章

  1. CF 1100C NN and the Optical Illusion(数学)

    NN is an experienced internet user and that means he spends a lot of time on the social media. Once ...

  2. 1100C NN and the Optical Illusion

    推公式,水题.cos()函数是默认弧度制的 #include <iostream> #include <cstring> #include <string> #in ...

  3. CodeForces-1100C NN and the Optical Illusion 简单数学

    题目链接:https://vjudge.net/problem/CodeForces-1100C 题意: 题目给出外部圆的数目n和内部圆的半径r,要求求出外部圆的半径以满足图片要求. 显然这是一道数学 ...

  4. NN and the Optical Illusion-光学幻觉 CodeForce1100C 几何

    题目链接:NN and the Optical Illusion 题目原文 NN is an experienced internet user and that means he spends a ...

  5. Codeforces Round #532(Div. 2) C.NN and the Optical IIIusion

    链接:https://codeforces.com/contest/1100/problem/C 题意: 一个圆球外面由其他圆球包裹,两两相连. 给出n,r. n为外面圆球数量,r为内部圆球半径. 求 ...

  6. Codeforces 1100 - A/B/C/D/E/F - (Undone)

    链接:https://codeforces.com/contest/1100 A - Roman and Browser - [暴力枚举] 题意:浏览器有 $n$ 个网页,编号 $1 \sim n$, ...

  7. Codeforces Round #532

    以后不放水题了 C.NN and the Optical Illusion 复习一下高中数学即可 $\frac{ans}{ans+r}=\sin \frac{\pi}{n}$ 解方程 #include ...

  8. Codeforces Round #532 (Div. 2) Solution

    A. Roman and Browser 签到. #include <bits/stdc++.h> using namespace std; ]; int get(int b) { ]; ...

  9. Codeforces Round #532 (Div. 2) 题解

    Codeforces Round #532 (Div. 2) 题目总链接:https://codeforces.com/contest/1100 A. Roman and Browser 题意: 给出 ...

随机推荐

  1. 读书笔记(chapter5)

    系统调用 5.1与内核通信 1.系统调用在用户空间进程和硬件设备之间添加一个中间层.作用有三个:它为用户空间提供了一种硬件的抽象接口:系统调用保证了系统的稳定和安全:系统调用是用户空间访问内核的唯一手 ...

  2. Python爬虫实战:2017中国最好大学排名

    抓取内容: 从最好大学网上抓取中国前10的大学排名.大学名称.总分,并数据格式左对齐. http://www.zuihaodaxue.cn/zuihaodaxuepaiming2017.html 首先 ...

  3. linux 解压文件

    原文:android之常用解压缩指令 .tar解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName ---------------------- ...

  4. 关于PSP(个人软件过程)

    在第一堂课时,杨老师就提到了PSP(个人软件过程),但是我从2016年3月10日才开始进行粗略的PSP时间管理统计,这是长迭代,用老师的话“差评”.然后在2016年3月11日下午的软件项目管理上,老师 ...

  5. C、C ++的内存模型

    http://blog.sina.com.cn/s/blog_af9acfc60101bbcy.html

  6. 一本通1623Sherlock and His Girlfriend

    1623:Sherlock and His Girlfriend 时间限制: 1000 ms         内存限制: 524288 KB [题目描述] 原题来自:Codeforces Round ...

  7. NOIP2018划水记

    // 6次NOIP里最爽的一次 去年的NOIP的游记:https://www.cnblogs.com/GXZlegend/p/7880740.html Day 0 特意请了一天假复习NOIP 实际上是 ...

  8. Grafana elasticsearch 应用

    早期的时候,项目基于ES+echart写了一些仪表盘的展示页面,虽然ES配合这种char界面有着天然的优势,但实际写起代码来,还是很多重复的劳动,在一次偶然中发现Grafana,看到它提供了很多仪表盘 ...

  9. oracle无法通过IP地址进行连接

    在oracle安装完成之后有时候后无法使用IP地址进行连接或者压根无法进行连接,此时我们可以通过配置oracle的监听来解决这个问题: 在开始菜单中找到oracle文件夹的net manager,如下 ...

  10. 修改MyEclipse取消默认工作空间

    使用MyEclipse,在最开始Workspace Launcher中选择工作空间时,勾选了默认选择,以后启动程序的时候,就不会弹出这个选择工作空间的对话框了.如下图: 但后来又新增一个工作空间,需要 ...