Upd: 加入了一些非常毒瘤的 corner case 测试点。

This commit is contained in:
DarkSharpness_XzY
2023-10-20 22:07:15 +08:00
parent f884cf0073
commit 28175399cb
6 changed files with 107 additions and 0 deletions

26
data/Integer3/3.cpp Normal file
View File

@ -0,0 +1,26 @@
/*
Time: 2023-10-20
Test: Copy constructor and assignment operator.
std Time: 0.30s
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;
}