摘要: 一、DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, yo... 阅读全文
posted @ 2013-07-25 23:21 InkGenius 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 一、Description(3302)Given a string s of length n, a subsequence of it, is defined as another strings' = su1su2...sum where 1 ≤u1 z[i][j-1] ?z[i-1][j]:... 阅读全文
posted @ 2013-07-25 22:45 InkGenius 阅读(191) 评论(0) 推荐(0) 编辑
摘要: LCS(Longest Common Subsequence),即最长公共子序列。一个序列,如果是两个或多个已知序列的子序列,且是所有子序列中最长的,则为最长公共子序列。原理: 事实上,最长公共子序列问题也有最优子结构性质。然后,用动态规划的方法找到状态转换方程。 记:Xi=﹤x1,⋯,xi... 阅读全文
posted @ 2013-07-25 22:40 InkGenius 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 一、DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stoc... 阅读全文
posted @ 2013-07-25 18:06 InkGenius 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Floyd-Warshall算法:是解决任意两点间的最短路径的一种算法,可以正确处理有向图或负权的最短路径问题,同时也被用于计算有向图的传递闭包。原理:Floyd-Warshall算法的原理是动态规划(DP)。设D_{i,j,k}为从i到j的只以(1..k)集合中的节点为中间节点的最短路径的长度。若... 阅读全文
posted @ 2013-07-25 17:46 InkGenius 阅读(377) 评论(0) 推荐(0) 编辑
摘要: Floyd-Warshall算法:是解决任意两点间的最短路径的一种算法,可以正确处理有向图或负权的最短路径问题,同时也被用于计算有向图的传递闭包。原理:Floyd-Warshall算法的原理是动态规划(DP)。设D_{i,j,k}为从i到j的只以(1..k)集合中的节点为中间节点的最短路径的长度。若... 阅读全文
posted @ 2013-07-25 17:46 InkGenius 阅读(128) 评论(0) 推荐(0) 编辑