上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 50 下一页
摘要: int prim(int n){ int lowcost[maxn]; //记录集合外的点到集合内的距离 bool s[maxn]; //记录是否包含在集合中 for(int i=1;i<=n;i++) { lowcost=c[1]; s=false; } s[1]=true; ... 阅读全文
posted @ 2013-07-18 06:59 码代码的猿猿 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 设Ω是m边形(如下图),顶点沿边界正向排列,,坐标依次为建立Ω的多边形区域向量图。由图知坐标原点与多边形任意相邻的两个顶点构成一个三角形,而三角形的面积可由三个顶点构成的两个平面向量的外积求得。任意多边形的面积公式多边形计算公式的计算和原点的选取没有关系,通常可以选点(0,0)或者多边形的第一个点(这个时候比较直观了,看起来就是把多边形分成一个个三角形和加起来,读者自己可以画个图)就可以了。 阅读全文
posted @ 2013-07-18 02:07 码代码的猿猿 阅读(1028) 评论(0) 推荐(0) 编辑
摘要: 改革春风吹满地Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14363 Accepted Submission(s): 7268Problem Description“ 改革春风吹满地,不会AC没关系;实在不行回老家,还有一亩三分地... 阅读全文
posted @ 2013-07-18 02:03 码代码的猿猿 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 汉诺塔IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3677 Accepted Submission(s): 1831Problem Description经典的汉诺塔问题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问... 阅读全文
posted @ 2013-07-18 01:20 码代码的猿猿 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 据说是作者在家病假蛋疼的产物。 天冷极了,下着雪,又快黑了。这是NOIP的前夜。在这又冷又黑的晚上,一个衣衫破烂的小女孩在机房敲着代码。她从班里逃出来的时候还拿着一本算导,但是有什么用呢?那是一本很破旧的书——那么大,一向是她妈妈垫桌角的。她默写SPFA的时候,年级主任突然冲进机房,吓得她把算导都丢掉了。书叫一个学数竞的捡起来拿着跑了。他说,他可以用那本书当草纸,证明切比雪夫定理。 小女孩... 阅读全文
posted @ 2013-07-16 20:18 码代码的猿猿 阅读(278) 评论(0) 推荐(0) 编辑
摘要: Subway tree systemsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 6215Accepted: 2590DescriptionSome major cities have subway systems in the form of a tree, i.e. between any pair of stations... 阅读全文
posted @ 2013-07-16 20:07 码代码的猿猿 阅读(275) 评论(0) 推荐(0) 编辑
摘要: BombTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 3935 Accepted Submission(s): 1369Problem DescriptionThe counter-terrorists found a time ... 阅读全文
posted @ 2013-07-16 07:58 码代码的猿猿 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Prison rearrangementTime Limit: 3000MSMemory Limit: 10000KTotal Submissions: 2008Accepted: 906DescriptionIn order to lower the risk of riots and escape attempts, the boards of two nearby prisons of eq... 阅读全文
posted @ 2013-07-16 01:48 码代码的猿猿 阅读(299) 评论(0) 推荐(0) 编辑
摘要: Jury CompromiseTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 23108Accepted: 5974Special JudgeDescriptionIn Frobnia, a far-away country, the verdicts in court trials are determined by a jury... 阅读全文
posted @ 2013-07-15 23:05 码代码的猿猿 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Cutting Sticks You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money according to the length of the stick being cut. Their pr... 阅读全文
posted @ 2013-07-14 07:35 码代码的猿猿 阅读(161) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 50 下一页