From 76c6e871a5e43f685bca1c1711e6adce748ecb26 Mon Sep 17 00:00:00 2001 From: DarkSharpness_XzY <2040703891@qq.com> Date: Sun, 22 Oct 2023 18:05:00 +0800 Subject: [PATCH] =?UTF-8?q?Upd:=20=E7=A7=BB=E9=99=A4=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E6=97=A0=E7=94=A8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/Corner/1.cpp | 40 ---------------------------------------- data/Corner/1.out | 4 ---- data/Corner/2.cpp | 30 ------------------------------ data/Corner/2.out | 2 -- data/Corner/3.cpp | 26 -------------------------- data/Corner/3.out | 3 --- 6 files changed, 105 deletions(-) delete mode 100644 data/Corner/1.cpp delete mode 100644 data/Corner/1.out delete mode 100644 data/Corner/2.cpp delete mode 100644 data/Corner/2.out delete mode 100644 data/Corner/3.cpp delete mode 100644 data/Corner/3.out diff --git a/data/Corner/1.cpp b/data/Corner/1.cpp deleted file mode 100644 index 0032234..0000000 --- a/data/Corner/1.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* -Time: 2023-10-20 -Test: Custom constructor. Div and mod. -std Time: 0.00s -Time Limit: 1.00s -Notes: Sanity check. -*/ - -#include "int2048.h" - -void sanity_check(sjtu::int2048 &x,sjtu::int2048 &y) { - // Sanity check of division - std::cout - << x / y << ' ' - << -x / y << ' ' - << x / -y << ' ' - << -x / -y << '\n'; - - // Sanity check of mod - std::cout - << x % y << ' ' - << -x % y << ' ' - << x % -y << ' ' - << -x % -y << '\n'; -} - -signed main() { - sjtu::int2048 x {"0000000000001145141919810"}; - sjtu::int2048 y {"-1145141919810"}; - - y += 1; - sanity_check(x, y); - - y += -2; - y -= -1; - - sanity_check(x, y); - - return 0; -} diff --git a/data/Corner/1.out b/data/Corner/1.out deleted file mode 100644 index 4cd9771..0000000 --- a/data/Corner/1.out +++ /dev/null @@ -1,4 +0,0 @@ --2 1 1 -2 --1145141919808 -1 1 1145141919808 --1 1 1 -1 -0 0 0 0 \ No newline at end of file diff --git a/data/Corner/2.cpp b/data/Corner/2.cpp deleted file mode 100644 index 8b42ce7..0000000 --- a/data/Corner/2.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* -Time: 2023-10-20 -Test: Custom constructor. Div and mod. -std Time: 0.00s -Time Limit: 1.00s -Notes: Sanity check. -*/ - -#include "int2048.h" - -void sanity_check(sjtu::int2048 &x) { - (0 / x).print(); std::cout << ' '; - (1 / x).print(); std::cout << ' '; - (-1 / x).print();std::cout << ' '; - - (0 % x).print(); std::cout << ' '; - (1 % x).print(); std::cout << ' '; - (-1 % x).print();std::cout << '\n'; -} - -signed main() { - sjtu::int2048 x; - - x.read("-1919810"); - sanity_check(x); - - x = -x; - sanity_check(x); - return 0; -} diff --git a/data/Corner/2.out b/data/Corner/2.out deleted file mode 100644 index 1764dec..0000000 --- a/data/Corner/2.out +++ /dev/null @@ -1,2 +0,0 @@ -0 -1 0 0 -1919809 -1 -0 0 -1 0 1 1919809 diff --git a/data/Corner/3.cpp b/data/Corner/3.cpp deleted file mode 100644 index b639755..0000000 --- a/data/Corner/3.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Time: 2023-10-20 -Test: Copy constructor and assignment operator. 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; -} diff --git a/data/Corner/3.out b/data/Corner/3.out deleted file mode 100644 index fa65454..0000000 --- a/data/Corner/3.out +++ /dev/null @@ -1,3 +0,0 @@ -111111111111111111111111111111111111111111111111111111111111111111111111112 -0 -0