greedybeibao.h

来自「c语言代码」· C头文件 代码 · 共 37 行

H
37
字号
// Profit.h: interface for the Profit class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PROFIT_H__6C623259_4ABC_48FF_A03F_8727A99E7AC2__INCLUDED_)
#define AFX_PROFIT_H__6C623259_4ABC_48FF_A03F_8727A99E7AC2__INCLUDED_

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

#include <iostream.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
#include <windows.h>
typedef struct 
{
	int Wei;
	int Val;
	float num;
	int num1;
}DataType;

class GreedyBeibao
{
private:
	DataType *A;
public:
	void Sort(DataType A[],int n);//排序
	void CinyouSelf(DataType A[],int n);
	void RandA(DataType A[],int n);
	int SubSet(int n, int k, bool * flag);
	void Greedyresult(int f1[],int f2[],int x[],DataType A[],bool flag[],
				  int &nu,int n,int m,int k,int &result,int &total);
};
#endif // !defined(AFX_PROFIT_H__6C623259_4ABC_48FF_A03F_8727A99E7AC2__INCLUDED_)

⌨️ 快捷键说明

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