摘要: /*多重背包问题。把a[i]排下序,然后把a[i]作为选第i件物品时的背包容量V。最后结果要[0, max(a[i])]遍历一遍,找到最大值。*///My Code:#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 40007;const int M = 407;class node {public: int h, c, a; friend bool operator < (c 阅读全文
posted @ 2011-12-31 16:28 AC_Von 阅读(183) 评论(0) 推荐(0) 编辑