上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 20 下一页
摘要: http://blog.csdn.net/fuyukai/article/details/51039788 Tarjan三大算法之双连通分量(割点,桥) Robert Endre Tarjan是一个美国计算机学家,他传奇的一生中发明了无数算法,统称为Tarjan算法。其中最著名的有三个,分别用来求解 1) 无向图的双连通分量 2) 有向图的强连通分量 3) 最近公共祖先问题 接下来几篇博客将分别... 阅读全文
posted @ 2017-03-09 21:41 Pic 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 转自beyond the void 的博客: https://www.byvoid.com/zhs/blog/scc-tarjan 注:红色为标注部分 [有向图强连通分量] 在有向图G中,如果两个顶点间至少存在一条路径,称两个顶点强连通(strongly connected)。如果有向图G的每两个顶点都强连通,称G是一个强连通图。非强连通图有向图的极大强连通子图,称为强连通分量(strongly ... 阅读全文
posted @ 2017-03-07 21:52 Pic 阅读(280) 评论(0) 推荐(0) 编辑
摘要: C. Andryusha and Colored Balloons time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Andryusha goes through a park each day. The squares and ... 阅读全文
posted @ 2017-03-07 21:42 Pic 阅读(76) 评论(0) 推荐(0) 编辑
摘要: B. The Meeting Place Cannot Be Changed time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output The main road in Bytecity is a straight li... 阅读全文
posted @ 2017-03-07 21:17 Pic 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 转自http://www.myexception.cn/program/1839999.html 妹子满分~~~~ 毛毛虫算法——尺取法 有这么一类问题,需要在给的一组数据中找到不大于某一个上限的“最优连续子序列” 于是就有了这样一种方法,找这个子序列的过程很像毛毛虫爬行方式,我管它叫毛毛虫算法,比较流行的叫法是“尺取法”。 喏,就像图里的妹纸一样~ 还是举个栗子: Poj3061 给长度为n... 阅读全文
posted @ 2017-02-28 21:22 Pic 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8312 Accepted Submission(s): 2992 Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了... 阅读全文
posted @ 2017-02-25 16:38 Pic 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 129 Accepted Submission(s): 59 Problem Description 推箱子是一个很经典的游戏.今天我们来玩一个简单版本.在一个M*N的房间里有一个箱子和一个搬... 阅读全文
posted @ 2017-02-25 15:08 Pic 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 注:本文转自http://www.cnblogs.com/furaibo/archive/2010/03/19/1689710.html 魔幻数组名 请看程序(本文程序在WIN32平台下编译): #include int main() { char str[10]; char *pStr = str; cout #include int main(int argc, c... 阅读全文
posted @ 2017-02-19 20:16 Pic 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 1、最大子段和问题 问题定义:对于给定序列a1,a2,a3……an,寻找它的某个连续子段,使得其和最大(如果某子序列全是负数则定义该子段和为 0)。如( -2,11,-4,13,-5,-2 )最大子段是{ 11,-4,13 }其和为20。 ·状态设计: dp[i] (1 = 0 (1 0, 那么显然b[j] = b[j-1] + a[j],用之前最大的一个加上a[j]即可,因为a[j]必须包... 阅读全文
posted @ 2017-02-17 23:47 Pic 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 201 Accepted Submission(s): 77 Problem Description There is a saying: Life is like a line, som... 阅读全文
posted @ 2017-02-16 17:00 Pic 阅读(160) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 20 下一页