题解 1103: 开心的金明

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

开心的金明 (C语言代码)

摘要:解题思路:01背包,价值加个乘法而己注意事项:参考代码:#include<stdio.h>#include<string.h>int max(long int a,long int b){    re……

开心的金明 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int v[30],p[30];long long x[30001];int main(){ int n,m,i,j,k; scanf(……

开心的金明 (Java代码)

摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class 开心的金明 { static int m; static int max=0; st……

开心的金明 (C++代码)

摘要:解题思路:01背包注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; const int Vmax=300……

开心的金明 (C语言代码)

摘要:解题思路:背包问题注意事项:参考代码:#include<stdio.h>int sum[25][30100]; int max(int a,int b){ if(a>b) { return a; }……

开心的金明 (C++代码)

摘要:解题思路:应该是用dp做的,然而并不会...强行DFS还是可以过的,可以承受20以内数据量的打击注意事项:哪个大佬来教我一下dp哈参考代码:#include <iostream> #define……

背包的变化应用

摘要:解题思路:用v[][]变量来存储每数量每价值的最大值,最后输出该矩阵的最右下元素即可!注意事项:注意数组的范围要加1,并且注意v的二维数组和val[],w[]之间差1参考代码:import java.……

开心的金明 (C++代码)

摘要:解题思路: 状态转移方程:注意事项:    背包问题参考代码:#include<iostream> using namespace std; #include<string.h> int m……