#include<iostream>
#include<ostream>
#include<stdlib.h>
#include<cmath>
#include<cstring>
#include<vector>
#include<stack>
#include<stdio.h>
#include<queue>
#include<string.h>
#include<algorithm>
#include<string>
#include<math.h>
using namespace std;
typedef long long LL;
#define MOD 998244353
#define maxn 1005
#define pi acos(-1.0)
#define INF 1e-7
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define MAXBIT 1007
#define BITTYPE int
struct BigInt {
BITTYPE bit[MAXBIT];
bool negative;//负数标志
public:
BigInt(); //默认构造函数,值为0
BigInt(const int); //构造函数
BigInt(const char *); //构造函数
BigInt(const BigInt &); //复制构造函数
/*重载赋值运算符*/
BigInt& operator=(const BigInt&);
BigInt& operator=(const int );
/*重载算数运算符*/
BigInt operator+(const BigInt& )const;
BigInt operator+(const int )const;
BigInt operator-(const BigInt& )const;
BigInt operator-(const int )const;
BigInt operator*(const BigInt& )const;
BigInt operator*(const int )const;
BigInt operator/(const int )const;
int operator%(const int )const;
/*重载比较运算符*/
bool operator>(const BigInt& )const;
bool operator>(const int )const;
bool operator>=(const BigInt& )const;
bool operator>=(const int )const;
bool operator<(const BigInt& )const;
bool operator<(const int )const;
bool operator<=(const BigInt& )const;
bool operator<=(const int )const;
bool operator==(const BigInt& )const;
bool operator==(const int )const;
bool operator!=(const BigInt& )const;
bool operator!=(const int )const;
void print()
大数C++写法:加减乘除模板
最新推荐文章于 2025-07-07 19:30:46 发布