版本比较
bigint模板
正文
增加 27 行删除 27 行
65 行未改动666768697070717273737475767769 行未改动14714814915015115115215315415546 行未改动20220320420520620620720820921029 行未改动24024124224324424424524624724824924925025125225325425425525625725825925926026126226326426426526626726826926927027127227327427427527627727827927928028128228328428428528628728828928929029129229329429429529629729829930030130230330330430530630730830830931031131231331331431531631731831831932032132232332332432532632732832832933033133233333333433533633733833833934034134234334334434534634734834834935035135235335335435535635735835936036136236336336436565 行未改动 } reverse(arr.begin(), arr.end()); } void operator = (const bigint& b){ if(this != &b){ if(this != &b){ arr=b.arr; } } } bigint(int val = 0) { *this = val; } friend bigint operator + (bigint a, bigint b){69 行未改动 sum++; } } return t; } } bigint operator + (int b) { bigint temp(b); return *this + temp; }46 行未改动 bigint c; char cc=_getchar_nolock(); while(cc<'0'||cc>'9'){ if(cc='-')c.f=1; cc=_getchar_nolock(); cc=_getchar_nolock(); } c.arr.push_back(cc^48); while((cc=_getchar_nolock())>='0'&&cc<='9'){ c.arr.push_back(cc^48);29 行未改动 inout& operator>>(int& res) { res = read_int(); return *this; }
inout& operator>>(unsigned int& res) { res = read_int(); return *this; }
inout& operator>>(unsigned long& res) { res = read_int(); return *this; }
inout& operator>>(long long& res) { res = read_int(); return *this; }
inout& operator>>(unsigned long long& res) { res = read_int(); return *this; }
inout& operator>>(float& res) { res = read_double(); return *this; }
inout& operator>>(double& res) { res = read_double(); return *this; }
inout& operator>>(long double& res) { res = read_double(); return *this; }
inout& operator>>(char& res) { res = getchar(); return *this; }
inout& operator>>(char*& res) { res = read_chars(); return *this; }
inout& operator>>(string& res) { res = read_string(); return *this; }
inout& operator>>(bigint& a) { a = a.in(); return *this; } inout& operator<<(const int& res) { write_int(res); return *this; }
inout& operator<<(const unsigned int& res) { write_int(res); return *this; }
inout& operator<<(const unsigned long& res) { write_int(res); return *this; }
inout& operator<<(const long long& res) { write_int(res); return *this; }
inout& operator<<(const unsigned long long& res) { write_int(res); return *this; }
inout& operator<<(const float& res) { write_double(res); // 默认六位精度 return *this; }
inout& operator<<(const double& res) { write_double(res); // 默认六位精度 return *this; }
inout& operator<<(const long double& res) { write_double(res, 10); // 默认十位精度 return *this; }
inout& operator<<(const char& res) { putchar(res); return *this; }
inout& operator<<(const char*& res) { write_chars(res); return *this; }
inout& operator<<(const string& res) { write_chars(res.c_str()); return *this; }
inout& operator<<(bigint a) { a.out(); return *this; }}cinn, coutt;#define cin cinn#define cout coutt#define int bigintsigned main(){
}```