⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bigint.h

📁 本算法实现2-10集合划分问题,采用动态规划法和大整数方法
💻 H
字号:
#include <stdio.h>

struct IntNode
{
	int		Data;
	IntNode *Prev, *Next;
};

class BigInteger
{
	int			sign;
	IntNode		*head, *end, *curNode;

	void Reset();
	int AbsCompare(const BigInteger &bi1, const BigInteger &bi2);
	void RemoveZeroOfHead();
	void AddNodeAtHead(int dat);
	void AddNodeAtEnd(int dat);
public:
	bool GetNum( char* input );
	void Print( FILE* stream = stdout );
	BigInteger operator + (const BigInteger &bi);
	BigInteger operator *(const int i);
	BigInteger& operator = (const BigInteger &bi);
	BigInteger();
	BigInteger(const int i);
	BigInteger(const BigInteger &bi);
	~BigInteger();	
};

⌨️ 快捷键说明

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