考试题目网址,接帖子存一下

jjj0 three bodys 2023-03-16 20:50:13 0

file:///C:/Users/IDC/Desktop/%E6%89%93%E5%AD%97%E6%AF%94%E8%B5%9B.pdf

{{ vote && vote.total.up }}

共 6 条回复

jjj0 three bodys

emm...阿哲,网速太慢,按提交没有切换页面,以为没点起......

jjj0 three bodys

#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;

}

jjj0 three bodys

#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; }

jjj0 three bodys

ff ff

jsq 蒟蒻

emmm...

有没有一种可能

你存的是本地文件地址

CPP 刷题王

你干嘛不用一个帖子存倪