mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-23 21:28:48 +00:00
fix(templates/BigInt): add !=
operator
This commit is contained in:
parent
552b92d595
commit
1feb2670c5
@ -7,9 +7,8 @@ class BigInt {
|
||||
int sign;
|
||||
std::string s;
|
||||
|
||||
BigInt() {
|
||||
s = "";
|
||||
}
|
||||
BigInt()
|
||||
: s("") {}
|
||||
|
||||
BigInt(std::string x) {
|
||||
*this = x;
|
||||
@ -44,6 +43,10 @@ class BigInt {
|
||||
return (s == x.s && sign == x.sign);
|
||||
}
|
||||
|
||||
bool operator!=(const BigInt& x) const {
|
||||
return (s != x.s || sign != x.sign);
|
||||
}
|
||||
|
||||
bool operator<(const BigInt& x) const {
|
||||
if (sign != x.sign) {
|
||||
return sign < x.sign;
|
||||
|
Loading…
Reference in New Issue
Block a user