file:///C:/Users/IDC/Desktop/%E6%89%93%E5%AD%97%E6%AF%94%E8%B5%9B.pdf
emm...阿哲,网速太慢,按提交没有切换页面,以为没点起......
#include<bits/stdc++.h>
using namespace std;
int main(){
for (int i = 1;i <= n;i++){ for (int v = 1;v <= m;v++){ for (int k = 0;k <= v;k++){ if (k * w[i] <= v){ dp[i][v] = max(dp[i -1][v],dp[i - 1][v - k * w[i] + k * c[i]]); }else{ dp[i][v] = dp[i - 1][v]; } } } } return 0;
}
#include<bits/stdc++.h> using namespace std; int main(){ for (int i = 1;i <= n;i++){ for (int v = 1;v <= m;v++){ for (int k = 0;k <= v;k++){ if (k * w[i] <= v){ dp[i][v] = max(dp[i -1][v],dp[i - 1][v - k * w[i] + k * c[i]]); }else{ dp[i][v] = dp[i - 1][v]; } } } } return 0; }
ff ff
emmm...
有没有一种可能
你干嘛不用一个帖子存倪
共 6 条回复
emm...阿哲,网速太慢,按提交没有切换页面,以为没点起......
#include<bits/stdc++.h>
using namespace std;
int main(){
}
#include<bits/stdc++.h> using namespace std; int main(){ for (int i = 1;i <= n;i++){ for (int v = 1;v <= m;v++){ for (int k = 0;k <= v;k++){ if (k * w[i] <= v){ dp[i][v] = max(dp[i -1][v],dp[i - 1][v - k * w[i] + k * c[i]]); }else{ dp[i][v] = dp[i - 1][v]; } } } } return 0; }
ff ff
emmm...
有没有一种可能
你存的是本地文件地址
你干嘛不用一个帖子存倪