题目描述:http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=111303&format=html
题目大意:给定三角形三边长,求内接圆半径。
题目大意:给定三角形三边长,求内接圆半径。
//解该题需要一些三角形知识: //1. p 为三角形周长一半,即 p = (a+b+c)/2.0 // 三角形面积 S = sqrt(p*(p-a)*(p-b)*(p-c))(海伦公式) //2. 内接圆半径 r = S/p // 另外该题还有一个很无聊的陷阱 // 当有一条边为 0 时,输出为:0.000,需要特殊处理 #include <cstdio> #include <cmath> int main() { double a, b, c, p; while(scanf("%lf %lf %lf", &a, &b, &c) != EOF) { if(a == 0 || b == 0 || c == 0) printf("The radius of the round table is: %.3lf\n", 0); else { p = (a + b + c) / 2.0; printf("The radius of the round table is: %.3lf\n", sqrt((p - a) * (p - b) * (p - c) / p)); } } return 0; }
发表评论
-
ACM 之 Java BigInteger
2011-06-01 20:26 0Java 的大整数类在ACM 中大有用武之地 ... -
判断点是否构成多边形, 顶点连续给出
2011-05-26 14:27 0#include <cstdio> #inc ... -
poj pku 1981 Circle and Points 点与圆 位置关系
2011-05-26 11:29 1264题目描述: http://poj.org/problem?id ... -
poj 1032 Parliament 数学
2011-05-25 17:34 1213题目描述: http://poj.org/problem?i ... -
poj 1385 Lifting the Stone 多边形重心
2011-05-25 11:13 1034题目描述: http://poj.org/problem?i ... -
poj 2676 Sudoku dfs 深搜
2011-05-16 21:05 875题目描述: http://poj.org/problem?i ... -
hdoj 2064 汉诺塔III 递推
2011-05-15 22:29 887题目描述: http://acm.hdu.edu.cn/sh ... -
hdoj 1207 汉诺塔II dp 动态规划
2011-05-15 21:22 1668题目描述: http://acm.hdu.edu.cn/sh ... -
poj 2506 Tiling 递推
2011-05-15 11:18 911题目描述: http://poj.org/problem?i ... -
poj 2420 A Star not a Tree? 多边形 费马点
2011-05-14 18:57 1799题目描述: http://poj.org/problem?i ... -
poj 2954 Triangle Pick 定理
2011-05-14 16:36 1086题目描述: http://poj.org/problem?i ... -
poj 1012 Joseph
2011-05-10 17:42 1235题目描述:poj.org/problem?id=10 ... -
zoj 1081 Points Within 点与多边形关系
2011-05-07 17:51 1135题目描述: http://acm.zju.edu.cn/on ... -
poj 1835 宇航员
2011-05-03 17:00 807题目描述:http://poj.org/problem?id ... -
poj 2398 Toy Storage
2011-04-23 20:19 718题目描述:http://www.poj.org/proble ... -
poj 1654 Area 多边形面积
2011-04-23 20:10 900题目描述:http://poj.org/proble ... -
poj 2318 TOYS 点 直线 位置关系
2011-04-23 10:06 670题目描述:http://poj.org/problem?id= ... -
poj pku 1673 EXOCENTER OF A TRIANGLE 三角形 垂心
2011-04-09 16:41 547题目描述:http://poj.org/problem?id= ... -
pc 111302 uva 10180 Rope Crisis in Ropeland!
2011-04-03 20:46 839题目描述: http://www.programming-ch ... -
poj 1971 Parallelogram Counting 平行四边形个数
2011-04-03 10:05 1217题目描述:http://poj.org/problem?id= ...
相关推荐
POJ2942-Knights of the Round Table 【Tarjan算法】 解题报告+AC代码 http://hi.csdn.net/!s/F3L8HO ================================== 我的POJ所有解题报告:...
Knights of the round re-edition DEMO v0.1.3 Source Options: Turbo AutoSkipFrame Mute Pause Flash 0.5x 1x 1.5x 2x 3x 4x How to play: <W S A D> Move <J> Attack <K> Jump <P> Pause Try combo keys to ...
The Knights Of Alentejo An Android rewrite of a Ludum Dare turn-based adventure game I wrote way back. Guide portuguese knights through a dungeon and kill demons. GooglePlay: ...
SKin++0.1.3源代码及其可执行文件
Know the exact time of 24 hours a day will help the clock tower on your desktop PC. The clock strikes every 15, 30, 45 and 60 minutes. Observe the change of day and night: watch face that lit up the ...
Revenge of the Knights是一款雄心勃勃的FF风格RPG游戏,使用Ogre引擎以C / C ++编写。 凭借着一个华丽的故事,它旨在成为网络上最好的免费RPG之一。
POLYGON+-+Knights+Pack.unitypackage 美术资源,还不错
Intel第二代Xeon Phi产品代号“Knights Landing”(KNL)的架构和技术细节,既可以继续做协处理器,也可以单独做中央主处理器,不再必须有Xeon的支撑,因而更加灵活。采用了14nm新工艺,架构是Silvermont的改进定制版...
POLYGON - Knights Pack 1.2.7z
knights
忠实骑士舰队 忠实骑士舰队(FFK)是一个星际公民组织,旨在成为黑暗宇宙中光的灯塔。 这是在组织的管理领域中使用的当前代码库的monorepo。... 回购中的几乎所有项目都将以/使用功能性范式编写,因此,您将看到遍及...
我关于RxJava的测试应用程序
这套资源包括中世纪战士、武器、旗帜、建筑等,场景截图可参考博客。喜欢这个风格的朋友,可以查看我的博客,寻找更多优秀资源。
The_Knights_Tour 如果将骑士放置在国际象棋棋盘上,那么骑士为了完全访问每个空间一次必须采取的动作顺序是什么?
Knights ready to protect your kingdom! VR ready. Each model has low polygon count and optimized textures. Great for mobile and hordes! (4 unique body textures and a weapons texture with specular and...
I added 2 shields for free, because your knights and warriors need all the help that can get! The models poly count ranges are around 350- 2000 poly, with the arrows being 30-50, this is so you can ...
强大的骑士Capcom的“骑士团之轮”与Capcom的“强大的最后一战”相遇-Sega Master System的争夺战。
leetcode 不会书名:编程骑士 描述 [部署时间:2020 年 5 月 2 日] 这个应用程序是为了展示我在 ...上所做的代码练习,让人们搜索其他 ...katas(代码挑战)时过滤不同的编程语言已经做了。...页面的线框,因为它们是最直接