ACM
文章平均质量分 83
churehill123
这个作者很懒,什么都没留下…
展开
-
POJ 3624 Charm Bracelet
Charm BraceletTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17111 Accepted: 7741DescriptionBessie has gone to the mall's jewelry store and spies a cha原创 2013-07-19 14:59:28 · 632 阅读 · 0 评论 -
ACM对拍程序
这里转载汇总了三篇blog,谢谢原著者。。ACM对拍程序过程。。。一、用随机程序生成符合题目的输入数据文件名为in.txt如何产生随机数:http://www.cnblogs.com/lvsi/archive/2011/04/21/2024079.html二、用AC的程序和你的程序分别跑数据in.txtAC程序生成out1.txt转载 2014-02-21 23:41:03 · 2457 阅读 · 0 评论 -
次小生成树 POJ 1679
The Unique MSTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18034 Accepted: 6251DescriptionGiven a connected undirected graph, tell if its minimum spa原创 2013-09-11 19:47:53 · 603 阅读 · 0 评论 -
ACM中关于图的邻接表的表示方法
最近做图的题比较多,除了克鲁斯卡尔和floyd,像广搜,普里姆,Bellman-Ford,迪杰斯特拉,SPFA,拓扑排序等等,都用到图的邻接表形式。 数据结构书上表示邻接表比较复杂,一般形式如下: Cpp代码 typedef struct Node { int dest; //转载 2013-08-24 20:17:29 · 1475 阅读 · 0 评论 -
POJ 3253 Fence Repair 堆的应用,优先队列
Fence RepairTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 20169Accepted: 6393DescriptionFarmer John wants to repair a small length of the fence a原创 2013-08-12 02:23:25 · 916 阅读 · 0 评论 -
POJ 2492 A Bug's Life 并查集的应用
A Bug's LifeTime Limit: 10000MSMemory Limit: 65536KTotal Submissions: 24838Accepted: 8088DescriptionBackground Professor Hopper is researching the sexual be原创 2013-08-09 10:41:21 · 670 阅读 · 0 评论 -
POJ 1291 This Sentence is False 并查集应用
This Sentence is FalseTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 859Accepted: 370DescriptionThe court of King Xeon 2.4 is plagued with intrigue原创 2013-08-09 13:40:57 · 1258 阅读 · 0 评论 -
POJ 1988 Cube Stacking 并查集
Cube StackingTime Limit: 2000MSMemory Limit: 30000KTotal Submissions: 16688Accepted: 5724Case Time Limit: 1000MSDescriptionFarmer John and Betsy are pla原创 2013-08-09 00:10:03 · 681 阅读 · 0 评论 -
POJ 1611 The Suspects 并查集裸题
The SuspectsTime Limit: 1000MSMemory Limit: 20000KTotal Submissions: 18766Accepted: 9075DescriptionSevere acute respiratory syndrome (SARS), an atypical pneum原创 2013-08-08 22:41:37 · 615 阅读 · 0 评论 -
UVa 112 Tree Summing
Tree SummingBackgroundLISP was one of the earliest high-level programming languages and, with FORTRAN, is one of the oldest languages currently being used. Lists, which are the fundamental data st原创 2013-08-07 13:15:05 · 1150 阅读 · 1 评论 -
闰日闰年问题 大年份计算
1414 - February 29PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBIt is 2012, and it's a leap year. So there is a "February 29" in原创 2013-07-22 11:17:37 · 1057 阅读 · 0 评论 -
POJ 1847 全部算法 图论
TramTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 8553DescriptionTram network in Zagreb consists of anumber of intersections and rails connecting some of them. In everyi转载 2013-07-22 15:04:14 · 579 阅读 · 0 评论 -
POJ 1686 Lazy Math Instructor 栈的应用
Lazy Math InstructorTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 3322 Accepted: 1114DescriptionA math instructor is too lazy to grade a question in t原创 2013-07-21 11:34:56 · 1277 阅读 · 0 评论 -
POJ 1887 Testing the CATCHER 最长不下降序列(LIS)问题
下面的这一段是看别人的,写的很好,所以摘了过来最长不下降序列(LIS)问题一般有两种算法一、简单的O(n^2)的算法 很容易想到用动态规划做。设lis[]用于保存第1~i元素元素中最长不下降序列的长度,则lis[i]=max(lis[j])+1,且num[i]>num[j],i>j。然后在lis[]中找到最大的一个值,时间复杂度是O(n^2)。二、复杂点的O(nlo原创 2013-07-19 22:40:07 · 501 阅读 · 0 评论 -
状压DP LightOJ 1011 1037 状压dp简单题
状态压缩DP …看了一个很好的入门介绍原创 2014-02-26 15:17:55 · 956 阅读 · 0 评论