已知边长为 1 ,给出偶数 n,求一个最小正方形将 2*n 边形包含起来的面积

已知有一个正 n 边形,我们可以轻松求出 角度α,为 360/(2*n),因为 n 一定可以被四整除,所以一定有四条边在相互垂直,进而落在正方形上,所以边 AB 记为正方形的边长

1/AB=tan(α),又知道 pi=180°,所以 AB=1/tan(pi/n)

int n,m,t;int i,j,k;string s;int main()
{//IOS;rush(){sd(n);n*=2;double ans=1.0/tan(pi/n);pf(ans);}//PAUSE;return 0;
}

C1. Simple Polygon Embedding(几何)相关推荐

  1. Educational Codeforces Round 87 (Rated for Div. 2)C2. Not So Simple Polygon Embedding【几何题】

    题目大意就是求n边形最小外接正方形 被卡了好久:听说是结论题: #include<cstdio> #include<cstdlib> #include<iostream& ...

  2. Simple Polygon Embedding CodeForces - 1354C1(计算几何)

    The statement of this problem is the same as the statement of problem C2. The only difference is tha ...

  3. Not So Simple Polygon Embedding CodeForces - 1354C2(计算几何)

    The statement of this problem is the same as the statement of problem C1. The only difference is tha ...

  4. Simple polygon

    In geometry, a simple polygon /ˈpɒlɪɡɒn/ is a polygon that does not intersect itself and has no hole ...

  5. matlab 凸包质心算法,求多边形凸包(线性算法)--陈氏凸包算法--Computing the convex hull of a simple polygon(源码)...

    陈氏凸包算法-算法参考:Computing the convex hull of a simple polygon 作者:Chern-Lin Chen 陈氏算法提供了一个线性效率求凸包的算法,本文使用 ...

  6. uva 10335 - Ray Inside a Polygon(几何)

    题目链接:uva 10335 - Ray Inside a Polygon 恶心题,注意精度和输出等问题,代码中有标识,后面有一些数据. #include <cstdio> #includ ...

  7. UVa 11971 - Polygon(几何概型 + 问题转换)

    链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...

  8. 线段树扫描线求矩形周长详解

    线段树扫描线求矩形周长详解 原创 wucstdio 最后发布于2018-04-24 16:12:09 阅读数 841 收藏 发布于2018-04-24 16:12:09 版权声明:本文为博主原创文章, ...

  9. POJ Area of Simple Polygons 扫描线

    这个题lba等神犇说可以不用离散化,但是我就是要用. 题干: DescriptionThere are N, 1 <= N <= 1,000 rectangles in the 2-D x ...

最新文章

  1. vscode插件列表及配置信息
  2. xsy 1836 - Shop
  3. 大话设计模式(十 会修电脑不会修收音机?——聊设计模式原则)
  4. CLion运行python程序
  5. 【NBIoT无线模块DTU数传电台】串口服务器RS232/RS485端口工业路由信号传输
  6. eBPF学习记录(四)使用libbpf开发eBPF程序
  7. TrueType、PostScript 和 OpenType 字体之间的区别是什么? truetype vs opentype
  8. 软件开发知识体系(一)
  9. 国家java认证考试报名入口,赶紧收藏!
  10. KMSpico 无后门下载
  11. Metasploit扫描漏洞模块
  12. 高校大数据教学实训平台以及实验室建设解决方案-美林数据
  13. CSU - 1256 天朝的单行道
  14. 微信公众号怎么发红包?
  15. Springboot-项目启动加载类
  16. 云计算架构中的Iaas、Paas、SaaS详解
  17. 软件开发中的3P和1A
  18. 神经网络研究现状分析,神经网络研究现状论文
  19. 质量管理工具_老七工具之一__帕累托图
  20. 网络营销就业方向有哪些?网络营销就业建议!

热门文章

  1. HEVC学习(三十四) —— 去方块滤波之五
  2. 分享一个:批量下载个性化桌面壁纸和各种唯美图片的方法
  3. centos7子系统 win10_Windows10内置Linux子系统初体验
  4. HDFS High Availability(HA)高可用、单点故障、主备集群、脑裂问题、数据同步问题、HDFS HA解决方案—QJM
  5. 设置切换输入法按键ctrl+shift
  6. xxlJob定时任务,文章的上下架
  7. JS 用时间戳计算两个时间之间间隔
  8. Counter()函数进行排序后如何得到有序的键
  9. 无线网可拼服务器吗6,当WiFi 6遇到了WiFi 6+,我们的网速真的变快了吗?
  10. 电源硬件设计----升降压变换器(负压输出)基础