首页 > TAG信息列表 > HDU2602

HDU2602 Bone Collector(01背包)

01背包模板题。 1维数组倒推。 1 #include<iostream> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 #define M 1005 6 int dp[M]; 7 int val[M],v[M]; 8 9 int main(){ 10 int t,N,V; 11 cin>>t; 12 while(t--){