当前位置:网站首页>洛谷题解P4326 求圆的面积
洛谷题解P4326 求圆的面积
2022-08-04 15:06:00 【51CTO】
一、题目
https://www.luogu.org/problemnew/show/P4326
二、分析
COCI是Crotian Open Competition in Informatics, 即克罗地亚信息学公开赛。
本题的坑点在于有些人不知道所谓的出租车几何下的“圆”其实是一个正方形:

上面这个“圆”中,中心点到边上的任意一点的距离都为|x1 - x2| + |y1 - y2| = 4。
这个“圆”是由上下两个三角形组成的,每个三角形的面积为2r * r / = r * r,所以“圆”的面积为2 * r * r。
三、代码
边栏推荐
猜你喜欢
随机推荐
leetcode:253. 至少需要多少间会议室
16、学习MySQL 正则表达式
RS|哨兵二号(.SAFE格式)转tif格式
ping的原理
[Problem solving] QT update component appears "To continue this operation, at least one valid and enabled repository is required"
Next -20- 使用自定义样式 (custom style)
leetcode:254. 因子的组合
IP第十六天笔记
1403. Minimum Subsequence in Non-Increasing Order
1401 - Web technology 】 【 introduction to graphical Canvas
Roslyn 节点的 Span 和 FullSpan 有什么区别
leetcode:255 验证前序遍历序列二叉搜索树
FTP协议抓包-工具wireshark与filezilla
Why does the decimal point appear when I press the space bar in word 2003?
Hangzhou electric the competition team arrangement (ACM)
Technology sharing | Description of the electronic fence function in the integrated dispatching system
宣传海报
leetcode: 255 Verify preorder traversal sequence binary search tree
什么,你告诉我?作用域也分种类?
卖家寄卖流程梳理









