Upd: 重命名文件夹。这些都是 corner case 测试。
This commit is contained in:
@ -25,9 +25,7 @@ void sanity_check(sjtu::int2048 &x,sjtu::int2048 &y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
signed main() {
|
signed main() {
|
||||||
// sanity check
|
|
||||||
sjtu::int2048 x {"0000000000001145141919810"};
|
sjtu::int2048 x {"0000000000001145141919810"};
|
||||||
// normal test
|
|
||||||
sjtu::int2048 y {"-1145141919810"};
|
sjtu::int2048 y {"-1145141919810"};
|
||||||
|
|
||||||
y += 1;
|
y += 1;
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Time: 2023-10-20
|
Time: 2023-10-20
|
||||||
Test: Copy constructor and assignment operator.
|
Test: Copy constructor and assignment operator. Operator +,-.
|
||||||
std Time: 0.00s
|
std Time: 0.00s
|
||||||
Time Limit: 1.00s
|
Time Limit: 1.00s
|
||||||
Notes: Sanity check.
|
Notes: Sanity check.
|
||||||
@ -18,8 +18,8 @@ void sanity_check(sjtu::int2048 &x) {
|
|||||||
signed main() {
|
signed main() {
|
||||||
sjtu::int2048 x {"111111111111111111111111111111111111111111111111111111111111111111111111112"};
|
sjtu::int2048 x {"111111111111111111111111111111111111111111111111111111111111111111111111112"};
|
||||||
sanity_check(x);
|
sanity_check(x);
|
||||||
std::cout << x << '\n';
|
std::cout << +(+(+(+x))) << '\n';
|
||||||
std::cout << -sjtu::int2048{0} << '\n';
|
std::cout << - - -sjtu::int2048{0} << '\n';
|
||||||
x.read("-0");
|
x.read("-0");
|
||||||
std::cout << x << '\n';
|
std::cout << x << '\n';
|
||||||
return 0;
|
return 0;
|
Reference in New Issue
Block a user