📄 greedybeibao.h
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -