knapsock.h

来自「01背包问题演示程序 用mfc实现01背包问题的dp算法」· C头文件 代码 · 共 34 行

H
34
字号
// KnapSock.h: interface for the KnapSock class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_KNAPSOCK_H__1F12C175_B8F1_40F8_BD14_3C7A386187AE__INCLUDED_)
#define AFX_KNAPSOCK_H__1F12C175_B8F1_40F8_BD14_3C7A386187AE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class KnapSock  
{
public:
	int WeightGot();
	int ValueGot();
	BOOL Mark(int* obj);
	int max;
	int num;
	void FindWay();
	KnapSock(int n, int m, int* w, int* v);
	KnapSock();
	virtual ~KnapSock();

protected:
	int weightgot;
	int flag;
	int** vmax;
	int* weight;
	int* value;
};

#endif // !defined(AFX_KNAPSOCK_H__1F12C175_B8F1_40F8_BD14_3C7A386187AE__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?