摘要: 题目地址:Sicily 1012. Stacking Cylinders思路: 最低层如果有n个圆,则一共会有n层,其中最高一层有1个。用n个数组记录n层圆的坐标,一开始输入底层的坐标,排序之后再不断利用下一层的坐标算出当前一层的坐标,知道最高层就行。对于每一个圆心坐标,可以用支撑它的下面两个圆心坐标通过几何计算方法算出。注意输出的格式。代码: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 struct Point{ 8 double x,y; 9 };10 11 void get_a_... 阅读全文
posted @ 2013-11-14 16:05 Jolin123 阅读(338) 评论(0) 推荐(0) 编辑