Files
BH-int2048-2023/data/Integer3/3.cpp
2023-10-20 22:08:54 +08:00

27 lines
640 B
C++

/*
Time: 2023-10-20
Test: Copy constructor and assignment operator.
std Time: 0.00s
Time Limit: 1.00s
Notes: Sanity check.
*/
#include "int2048.h"
void sanity_check(sjtu::int2048 &x) {
x = x = x = x = x = x = x = x = x;
sjtu::int2048 y = (((((((((((((x)))))))))))));
sjtu::int2048 z = (((((((-(((((x))))))))))));
x = ( x = (x = (x = y + z + x)));
}
signed main() {
sjtu::int2048 x {"111111111111111111111111111111111111111111111111111111111111111111111111112"};
sanity_check(x);
std::cout << x << '\n';
std::cout << -sjtu::int2048{0} << '\n';
x.read("-0");
std::cout << x << '\n';
return 0;
}