题目链接: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. 20135202闫佳歆--week4 课本第5章学习笔记

    第五章 系统调用 一.与内核通信 系统调用在用户控件进程和硬件设备之间添加了一个中间层,作用如下" 为用户空间提供了一种硬件的抽象接口 系统调用保证了系统的稳定和安全 每个进程都运行在虚拟系 ...

  2. Linux内核设计与实现 第五章

    1. 什么是系统调用 系统调用就是用户程序和硬件设备之间的桥梁. 用户程序在需要的时候,通过系统调用来使用硬件设备. 系统调用的存在意义: 1)用户程序通过系统调用来使用硬件,而不用关心具体的硬件设备 ...

  3. DHCP分配固定IP

    https://www.cnblogs.com/liu1026/p/9829337.html 按照上面的操作实验好后在DHCP服务端的配置文件中加入

  4. Beta冲刺——day7

    Beta冲刺--day7 作业链接 Beta冲刺随笔集 github地址 团队成员 031602636 许舒玲(队长) 031602237 吴杰婷 031602220 雷博浩 031602134 王龙 ...

  5. [转帖]技术盛宴 | 关于PoE以太网供电技术详解

    技术盛宴 | 关于PoE以太网供电技术详解 https://smb.pconline.com.cn/1208/12085824.html   [PConline 干货铺]随着物联网技术飞速发展,需要提 ...

  6. PSP(3.16——3.22)以及周记录

    3.17 13:30 14:45 15 60 讨论班 A Y min 14:50 17:05 5 130 得到设备 Cordova 蓝牙连接 A Y min 23:15 23:45 5 25 英语百词 ...

  7. maven项目编译运行时提示jdk版本过低问题解决方法

    明明使用的是1.8jdk,但是运行项目时提示使用的是java版本是1.5,版本过低. 修改pom.xml,添加如下: <build> <plugins> <plugin& ...

  8. KD-Tree学习笔记

    参考:https://trinkle23897.github.io/pdf/K-D%20Tree.pdf KD-Tree是一种维护K维空间点的类似BST的数据结构.绝大多数时候只用来维护二维空间的点, ...

  9. BZOJ5462 APIO2018新家(线段树+堆)

    一个显然的做法是二分答案后转化为查询区间颜色数,可持久化线段树记录每个位置上一个同色位置,离线后set+树状数组套线段树维护.这样是三个log的. 注意到我们要知道的其实只是是否所有颜色都在该区间出现 ...

  10. Django_基于模块的单例模式

    基于模块的单例模式  原理: Python 的独有特性 : 模块的导入只能生效一次. 再重复导入只要基于一套环境都是使用的 最初 的那份资源.  示例: 文档结构: # mysingleton.py ...