zyzz.h

来自「用回溯法求解0—1背包问题」· C头文件 代码 · 共 32 行

H
32
字号
// ZYZZ.h: interface for the CZYZZ class.
//
//////////////////////////////////////////////////////////////////////
//装载问题求解
//linxiaomengdi 2008.4.8
//hemaoshun@163.com
#if !defined(AFX_ZYZZ_H__53F8DF21_C03B_4DEF_8DDB_63641DB384F2__INCLUDED_)
#define AFX_ZYZZ_H__53F8DF21_C03B_4DEF_8DDB_63641DB384F2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <iostream.h>
#include <string.h>
class Loading{
	friend int MaxLoading(int [],int ,int ,int []);
private:
	int n; //集装箱数
	int *x;//当前解
	int *bestx;//当前最优解
	int *w;//集装箱重量数组
	int c;//第一艘轮船的载重量
	int cw;//当前载重量
	int bestw;//当前最优载重量
	int r;//剩余集装箱重量
	void Backtrace(int i);
	
};


#endif // !defined(AFX_ZYZZ_H__53F8DF21_C03B_4DEF_8DDB_63641DB384F2__INCLUDED_)

⌨️ 快捷键说明

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