摘要: 双向图模板:#include #include using namespace std;int e[101][101];int match[101];int book[101];int n,m;int dfs(int u){ int i; for(i=1;i#include #inclu... 阅读全文
posted @ 2016-08-15 15:31 Lawliet__zmz 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;int n,m,e[9][9],root;int num[9],low[9],flag[9],index;void dfs(int cur,int father){ int child= 0,i; index++... 阅读全文
posted @ 2016-08-14 00:14 Lawliet__zmz 阅读(267) 评论(0) 推荐(0) 编辑
摘要: Sum of divisorsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5053 Accepted Submission(s):... 阅读全文
posted @ 2016-08-13 09:15 Lawliet__zmz 阅读(130) 评论(0) 推荐(0) 编辑
摘要: HuntersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1501 Accepted Submission(s): 1129Pro... 阅读全文
posted @ 2016-08-13 09:12 Lawliet__zmz 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Conquer a New RegionTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1939 Accepted Submissio... 阅读全文
posted @ 2016-08-12 10:40 Lawliet__zmz 阅读(145) 评论(0) 推荐(0) 编辑
摘要: The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 33882 Accepted: 16428DescriptionSevere acute respiratory syndrome ... 阅读全文
posted @ 2016-08-11 18:13 Lawliet__zmz 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Yukari's BirthdayTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5071 Accepted Submission(... 阅读全文
posted @ 2016-08-11 16:12 Lawliet__zmz 阅读(145) 评论(0) 推荐(0) 编辑
摘要: The Little Girl who Picks MushroomsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2600 Acc... 阅读全文
posted @ 2016-08-11 10:31 Lawliet__zmz 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 一:邻接矩阵版本SPFA//如果要判断负环的话加一个记录入队的数组就行,当入队次数大于n的时候出现负环 int d[MAXN],vis[MAXN],w[MAXN][MAXN]; int n; void SPFA(int s) { fill(d,d... 阅读全文
posted @ 2016-08-10 11:05 Lawliet__zmz 阅读(121) 评论(0) 推荐(0) 编辑
摘要: WormholesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 44174 Accepted: 16235DescriptionWhile exploring his many farms, Farmer John has dis... 阅读全文
posted @ 2016-08-10 11:02 Lawliet__zmz 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 做算法和作技术哪个难? 都很难, 没有可比性. 但是算法做得好的可以转行做技术, 技术做得好的想转行做算法却很困难.我是08年下半年将近期末的时候加入华理ACM队的. 我高中的时候没有编程经验, 数学也不好, 高考数学刚及格. 因为第二工业大学的网络工程专业的分数是最低的, 所以就比较巧合地步入了计... 阅读全文
posted @ 2016-08-10 09:32 Lawliet__zmz 阅读(142) 评论(0) 推荐(0) 编辑
摘要: TramTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13527 Accepted: 4978DescriptionTram network in Zagreb consists of a number of intersecti... 阅读全文
posted @ 2016-08-09 20:22 Lawliet__zmz 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 76917 Accepted Submission(s): 32406Prob... 阅读全文
posted @ 2016-08-09 11:00 Lawliet__zmz 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 用图的邻接矩阵存储法,它的空间和时间复杂度都是N2,现在我来介绍另外一种存储图的方法:邻接表,这样空间和时间复杂度就都是M。对于稀疏图来说,M要远远小于N2。先上数据,如下。4 5 1 4 9 4 3 8 1 2 5 2 4 6 1 3 7 第一行两个整数n m。n表示顶点个数(... 阅读全文
posted @ 2016-08-08 20:58 Lawliet__zmz 阅读(302) 评论(0) 推荐(1) 编辑
摘要: 优先队列:顾名思义,首先它是一个队列,但是它强调了“优先”二字,所以,已经不能算是一般意义上的队列了,它的“优先”意指取队首元素时,有一定的选择性,即根据元素的属性选择某一项值最优的出队~百度百科上这样描述的: 优先级队列 是不同于先进先出队列的另一种队列。每次从队列中取出的是具有最高优先权的元素... 阅读全文
posted @ 2016-08-08 15:28 Lawliet__zmz 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 40009 Accepted: 13044DescriptionFarmer John wants to repair a small length of th... 阅读全文
posted @ 2016-08-08 15:26 Lawliet__zmz 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Borg MazeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12944 Accepted: 4224DescriptionThe Borg is an immensely powerful race of enhanced h... 阅读全文
posted @ 2016-08-08 15:08 Lawliet__zmz 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Sorting It All OutTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 32933 Accepted: 11445DescriptionAn ascending sorted sequence of distinct v... 阅读全文
posted @ 2016-08-07 15:30 Lawliet__zmz 阅读(158) 评论(0) 推荐(0) 编辑
摘要: FDNY to the Rescue!Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 2897 Accepted: 887DescriptionThe Fire Department of New Yor... 阅读全文
posted @ 2016-08-06 18:01 Lawliet__zmz 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Invitation CardsTime Limit: 8000MS Memory Limit: 262144KTotal Submissions: 25066 Accepted: 8277DescriptionIn the age of television, not ... 阅读全文
posted @ 2016-08-06 16:47 Lawliet__zmz 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Currency ExchangeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 26610 Accepted: 9842DescriptionSeveral currency exchange points are working... 阅读全文
posted @ 2016-08-06 15:19 Lawliet__zmz 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Cube StackingTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 23635 Accepted: 8281Case Time Limit: 1000MSDescriptionFarmer John and Betsy are... 阅读全文
posted @ 2016-08-05 20:45 Lawliet__zmz 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 车票:http://blog.csdn.net/niushuai666/article/details/6662911#comments例子就是杭电上的畅通工程:http://acm.hdu.edu.cn/showproblem.php?pid=1232首先在地图上给你若干个城镇,这些城镇都可以看作... 阅读全文
posted @ 2016-08-05 16:23 Lawliet__zmz 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 谨以此文献给所有想当程序员的朋友 (一) 文章由来及个人经历 我是一名计算机专业的本科毕业生,毕业已经1年多了。毕业后从事的是软件编程工作,经常有其他专业的朋友想从事软件编程工作,向我请教如何,因为我自觉涉行不深,不敢信口开河,无奈朋友信任,我不得不郑重考虑一下这个问题了,来... 阅读全文
posted @ 2016-08-05 16:21 Lawliet__zmz 阅读(191) 评论(0) 推荐(0) 编辑
摘要: PeriodTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 16431 Accepted: 7886DescriptionFor each prefix of a given string S with N characters (... 阅读全文
posted @ 2016-08-05 15:55 Lawliet__zmz 阅读(165) 评论(0) 推荐(0) 编辑