diff --git a/linear_algebra/matrix_product_mod_2/gen/many_1.cpp b/linear_algebra/matrix_product_mod_2/gen/many_1.cpp new file mode 100644 index 000000000..ccf42ef5d --- /dev/null +++ b/linear_algebra/matrix_product_mod_2/gen/many_1.cpp @@ -0,0 +1,35 @@ +#include "random.h" + +#include + +#include "../params.h" + +using namespace std; + +int main(int, char* argv[]) { + long long seed = atoll(argv[1]); + auto gen = Random(seed); + + int n = N_MAX; + int m = N_MAX; + int k = N_MAX; + + printf("%d %d %d\n", n, m, k); + + auto get = [&]() -> int { + int k = gen.uniform(0, 1000); + return (k == 0 ? 0 : 1); + }; + + for (int i = 0; i < n; i++) { + for (int j = 0; j < m; j++) { printf("%d", get()); } + printf("\n"); + } + + for (int i = 0; i < m; i++) { + for (int j = 0; j < k; j++) { printf("%d", get()); } + printf("\n"); + } + + return 0; +} diff --git a/linear_algebra/matrix_product_mod_2/hash.json b/linear_algebra/matrix_product_mod_2/hash.json index e0efa582e..e6fe49e25 100644 --- a/linear_algebra/matrix_product_mod_2/hash.json +++ b/linear_algebra/matrix_product_mod_2/hash.json @@ -5,6 +5,10 @@ "example_01.out": "39b8dc3fc8b44765c8e6f1adee04c5b465e555ab791cc42d0d9e810d5b64297c", "example_02.in": "80e9fae65f4eba4943a7e81f257d954664b3588dcec7c79ff9febf142c26f142", "example_02.out": "9a271f2a916b0b6ee6cecb2426f0b3206ef074578be55d9bc94f6f3fe3ab86aa", + "many_1_00.in": "92f6e3437378b05420505cc1a345ecfb5e22d820819e641f9c416c8e0a2c7438", + "many_1_00.out": "7f67cd95687a9784656cd680eeeab16a583d8b0b2f2998207b580dad9f5a6603", + "many_1_01.in": "a02ea48dc1950a1b28729cb80d6921fc0c2e5270d2d9647721b967d863995b68", + "many_1_01.out": "480658c1103c9d743d248c61928172f7a00ff2e50eaf4533bb4e04e91c740fb8", "max_random_00.in": "2edf1287b9f47dfc0a1fcae626227c29c186ce7e173f78f607b0fcf03aa2d454", "max_random_00.out": "8754bdad2edc8194bf4d301c75c387169ce803dfea687d043785353cfa5b9c52", "max_random_01.in": "605d3ee8d917e50bb03993e5f6eaae834d9983b87a7ec6307e3d5f4d3d5bab89", diff --git a/linear_algebra/matrix_product_mod_2/info.toml b/linear_algebra/matrix_product_mod_2/info.toml index ade007456..629533458 100644 --- a/linear_algebra/matrix_product_mod_2/info.toml +++ b/linear_algebra/matrix_product_mod_2/info.toml @@ -18,6 +18,10 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/896" name = "middle.cpp" number = 5 +[[tests]] + name = "many_1.cpp" + number = 2 + [[solutions]] name = "naive.cpp" allow_tle = true