2019年7月14日

计算机操作系统巡回置换算法

摘要: 令P[1 : n]为1到n(n>1)的整数置换。 设i=1,2,3,4,5,6,7 P[i] = {4,7,3,2,1,5,6},描述P[i]的巡回置换算法。 代码: 为方便观察,多了几步输出。 阅读全文

posted @ 2019-07-14 22:00 Algorithm_Ethusiast 阅读(4058) 评论(0) 推荐(0) 编辑

HDU 2041 DP

摘要: URL:https://vjudge.net/problem/HDU-2041 简单DP,因为每次只能走1或者2阶,所以当走到第i阶的时候(i>=4),那么它的前一种状态只可能是i-1和i-2,所以状态方程为: DP[2] = 1; DP[3] = 2; DP[i] = DP[i-1] + DP[i 阅读全文

posted @ 2019-07-14 17:02 Algorithm_Ethusiast 阅读(199) 评论(0) 推荐(0) 编辑

HDU 2044 DP (fibonacci)

摘要: HDU 2044 https://vjudge.net/problem/HDU-2044 每一个只有可能由它左面的以及左上的状态变过来,也就是F(i-1)和F(i-2) F(1) = 1 F(2) = 2 F(i) = F(i-1) + F(i-2) (i>=3) AC 代码: 阅读全文

posted @ 2019-07-14 16:50 Algorithm_Ethusiast 阅读(152) 评论(0) 推荐(0) 编辑

HDU 2018 Cow Story DP

摘要: Basic DP Problem URL:https://vjudge.net/problem/HDU-2018 Describe: There is a cow that gives birth to a heifer every year.Every heifer starts in the f 阅读全文

posted @ 2019-07-14 12:02 Algorithm_Ethusiast 阅读(261) 评论(0) 推荐(0) 编辑

HDU 2084 DP

摘要: HDU 2084:https://vjudge.net/problem/HDU-2084 Problem Describe : When it comes to the DP algorithm, a classic example is the tower problem, which is de 阅读全文

posted @ 2019-07-14 11:24 Algorithm_Ethusiast 阅读(276) 评论(0) 推荐(0) 编辑

导航