龙姑娘  

2016年8月1日

摘要: Description 我们知道,在编程中,我们时常需要考虑到时间复杂度,特别是对于循环的部分。例如, 如果代码中出现 for(i=1;i<=n;i++) OP ; 那么做了n次OP运算,如果代码中出现 fori=1;i<=n; i++) for(j=i+1;j<=n; j++) OP; 那么做了n 阅读全文
posted @ 2016-08-01 17:16 龙姑娘 阅读(234) 评论(0) 推荐(0) 编辑
 
摘要: Description 用N个三角形最多可以把平面分成几个区域? Description 用N个三角形最多可以把平面分成几个区域? 用N个三角形最多可以把平面分成几个区域? Input 输入数据的第一行是一个正整数T(1<=T<=10000),表示测试数据的数量.然后是T组测试数据,每组测试数据只包 阅读全文
posted @ 2016-08-01 17:01 龙姑娘 阅读(446) 评论(0) 推荐(1) 编辑
 
摘要: Description 给你一个高为n ,宽为m列的网格,计算出这个网格中有多少个矩形,下图为高为2,宽为4的网格. Description 给你一个高为n ,宽为m列的网格,计算出这个网格中有多少个矩形,下图为高为2,宽为4的网格. 给你一个高为n ,宽为m列的网格,计算出这个网格中有多少个矩形, 阅读全文
posted @ 2016-08-01 16:41 龙姑娘 阅读(189) 评论(0) 推荐(0) 编辑

2016年7月28日

摘要: Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages s 阅读全文
posted @ 2016-07-28 11:53 龙姑娘 阅读(348) 评论(0) 推荐(0) 编辑
 
摘要: Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning 阅读全文
posted @ 2016-07-28 11:39 龙姑娘 阅读(196) 评论(0) 推荐(0) 编辑
 
摘要: Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but 阅读全文
posted @ 2016-07-28 11:22 龙姑娘 阅读(150) 评论(0) 推荐(0) 编辑

2016年7月26日

摘要: Description 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Description 某省调查乡村 阅读全文
posted @ 2016-07-26 16:34 龙姑娘 阅读(135) 评论(0) 推荐(0) 编辑

2016年7月24日

摘要: Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Description 很多学校流行一种比较的习惯 阅读全文
posted @ 2016-07-24 20:24 龙姑娘 阅读(155) 评论(0) 推荐(0) 编辑
 
摘要: Description FJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as mu 阅读全文
posted @ 2016-07-24 20:14 龙姑娘 阅读(170) 评论(0) 推荐(0) 编辑
 
摘要: Description There is a cycle with its center on the origin. Now give you a point on the cycle, you are to find out the other two points on it, to maxi 阅读全文
posted @ 2016-07-24 19:50 龙姑娘 阅读(163) 评论(0) 推荐(0) 编辑