算法复习资料

时间:2014-12-21 14:59:37
【文件属性】:

文件名称:算法复习资料

文件大小:105KB

文件格式:DOC

更新时间:2014-12-21 14:59:37

动态规划 贪心算法 回溯法 分支限界法

最优装载 void Loading(int x[], Type w[], Type c, int n) {int *t = new int [n+1];Sort(w, t, n); for (int i = 1; i <= n; i++) x[i] = 0; for (int i = 1; i <= n && w[t[i]] <= c; i++) {x[t[i]] = 1; c -= w[t[i]];}}


网友评论