You, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a huge cavern, which consists of many rooms connected with tunnels. Each room is occupied by some bugs, and their brains hide…
伪代码 用二维数组记录,如果出现可以转移的dp那么记录bk[当前体积][装的物品]=1 输出的时候倒推,如果存在连通的边那么输出并且总共的体积减去输出的体积 代码(uva-624,目前wa不明所以,网上的答案也是那么输出的,或许要输出最多的物品?目前也不会这种玩法) #include <bits/stdc++.h> using namespace std; int v[1000],dp[1000000],bk[1000][1000]; int main() { ios::sync_with_s…