Skip to content

Commit

Permalink
Merge pull request #1162 from maspypy/1125
Browse files Browse the repository at this point in the history
テストケース追加(issue 1125)
  • Loading branch information
maspypy authored May 21, 2024
2 parents 10d33a1 + 91a0186 commit 8d0ba7a
Show file tree
Hide file tree
Showing 12 changed files with 166 additions and 1 deletion.
33 changes: 33 additions & 0 deletions math/convolution_mod/gen/small_and_large.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <cstdio>
#include "../params.h"
#include "random.h"

using namespace std;

int main(int, char* argv[]) {
long long seed = atoll(argv[1]);
auto gen = Random(seed);

int ns[] = {100, 1000};
int n = ns[seed & 1];
int m = N_AND_M_MAX;
if (seed & 2) swap(n, m);

vector<int> a(n), b(m);

for (int i = 0; i < n; i++) { a[i] = gen.uniform(0ll, MOD - 1); }
for (int i = 0; i < m; i++) { b[i] = gen.uniform(0ll, MOD - 1); }

printf("%d %d\n", n, m);
for (int i = 0; i < n; i++) {
printf("%d", a[i]);
if (i != n - 1) printf(" ");
}
printf("\n");
for (int i = 0; i < m; i++) {
printf("%d", b[i]);
if (i != m - 1) printf(" ");
}
printf("\n");
return 0;
}
8 changes: 8 additions & 0 deletions math/convolution_mod/hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@
"small_14.out": "85c3fd86c69853bf54cccdf37c0a343d14850bdbd6fcefeab6c3a4132c2c0e2e",
"small_15.in": "ccb7c3695a22c9c1afb1dedbbfcc58c29b8d817dd6c74f015a61c8980b5f98db",
"small_15.out": "c10e4f298ec1d47116c30c26e16b48713231fb0456775a235ae146ebf746c865",
"small_and_large_00.in": "98d872313aa6359d29b2f54b1863569e1b2ada0788f318ea5f124bed1ff83234",
"small_and_large_00.out": "539720d1badbe14f9902781ac1f4a28cdee2731778b36164d4e8613ca644d1be",
"small_and_large_01.in": "e59d9701f5ad8619d28681bcb61d5f180313838c62387b709d7a738b7aa576a4",
"small_and_large_01.out": "1a3cb48b5bfad5eadb74a8b7fe016ea6b214baf7d57d3f2e9cbd3f1e1dc056ed",
"small_and_large_02.in": "b20215aff1b690bb6499daac134565e8efa3a8c47996aa1be6588b2c17672c83",
"small_and_large_02.out": "9226d5281ce890a30e9c3921cb2990e6874f68f70f2dad005d26a5c994d5975a",
"small_and_large_03.in": "7b394c263060739762fbf708ef2a52673e79f73d13706cf23ef515cb3c14c5ca",
"small_and_large_03.out": "cac654c1d751d97ee6d41af03d4fe91aa8d02dd6c1afd4a4b21acebabc2467be",
"unsigned_overflow_00.in": "9ebbc9ee08996e7a352c1f688574cb0021ecc6e1d02ffbc1515486721452084c",
"unsigned_overflow_00.out": "0229b0cd8035b7b20369a57a10deaab40f8d3826b1816b2142731965a4c3274a"
}
3 changes: 3 additions & 0 deletions math/convolution_mod/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/42"
[[tests]]
name = "unsigned_overflow.cpp"
number = 1
[[tests]]
name = "small_and_large.cpp"
number = 4

[[solutions]]
name = "naive.cpp"
Expand Down
33 changes: 33 additions & 0 deletions math/convolution_mod_1000000007/gen/small_and_large.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <cstdio>
#include "../params.h"
#include "random.h"

using namespace std;

int main(int, char* argv[]) {
long long seed = atoll(argv[1]);
auto gen = Random(seed);

int ns[] = {100, 1000};
int n = ns[seed & 1];
int m = N_AND_M_MAX;
if (seed & 2) swap(n, m);

vector<int> a(n), b(m);

for (int i = 0; i < n; i++) { a[i] = gen.uniform(0ll, MOD - 1); }
for (int i = 0; i < m; i++) { b[i] = gen.uniform(0ll, MOD - 1); }

printf("%d %d\n", n, m);
for (int i = 0; i < n; i++) {
printf("%d", a[i]);
if (i != n - 1) printf(" ");
}
printf("\n");
for (int i = 0; i < m; i++) {
printf("%d", b[i]);
if (i != m - 1) printf(" ");
}
printf("\n");
return 0;
}
8 changes: 8 additions & 0 deletions math/convolution_mod_1000000007/hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@
"small_14.out": "5cff8cd0a73f627b13c0fda14f204eda42d0586452625d9c622e2e8c4cfcbbbf",
"small_15.in": "ccb7c3695a22c9c1afb1dedbbfcc58c29b8d817dd6c74f015a61c8980b5f98db",
"small_15.out": "d1973399c877ddaa31ffe3c60b229a56f6eecdbf3f9b9fc1c9e1813b578c1e26",
"small_and_large_00.in": "19bc565627f09c6143b49fc10dc517d2326f4de9b87d55ca1ccc08ebd9b20d42",
"small_and_large_00.out": "a634b7fd2ea6dd694e65d69aee4d67529bc86235f837eb126dd0c5ebfb28a92f",
"small_and_large_01.in": "458106a1bd3db589a85f8c83e1cd26f545ee9b7bda948d8af1a0f86dc908eedf",
"small_and_large_01.out": "43ffe97029ee9f49a6e1ca9fd7d7727991ce235a2e4911896e8032af0ea257f4",
"small_and_large_02.in": "52a047a76d7b596328fec337a14b49444cfcfcb5d49c32ee3dc39e3f416fd016",
"small_and_large_02.out": "19b9117d654fe0990a84a1d0af588596ca3fd197088b10346d2c08e68126e651",
"small_and_large_03.in": "693915a28577acea0e5b1736e6b4d12800197af3087d29f986f7159a1fa3b161",
"small_and_large_03.out": "9181f04fcbacc7457a77e2a9cfa285fef373c454d9bc6a5103cdcb70c57fcd89",
"unsigned_overflow_00.in": "3d848cf445935f64c462a92656896e038d5d430be519690f5ed9ee9367478fcc",
"unsigned_overflow_00.out": "0229b0cd8035b7b20369a57a10deaab40f8d3826b1816b2142731965a4c3274a"
}
3 changes: 3 additions & 0 deletions math/convolution_mod_1000000007/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/145"
[[tests]]
name = "unsigned_overflow.cpp"
number = 1
[[tests]]
name = "small_and_large.cpp"
number = 4

[[solutions]]
name = "naive.cpp"
Expand Down
28 changes: 28 additions & 0 deletions math/convolution_mod_2_64/gen/small_and_large.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <stdio.h>
#include "../params.h"
#include "random.h"

using namespace std;

int main(int, char* argv[]) {
const long long seed = atoll(argv[1]);
auto rng = Random(seed);

int ns[] = {100, 1000};
int n = ns[seed & 1];
int m = N_AND_M_MAX;
if (seed & 2) swap(n, m);

printf("%d %d\n", n, m);
for (int i = 0; i < n; ++i) {
if (i > 0) printf(" ");
printf("%llu", rng.uniform(0ULL, ~0ULL));
}
puts("");
for (int i = 0; i < m; ++i) {
if (i > 0) printf(" ");
printf("%llu", rng.uniform(0ULL, ~0ULL));
}
puts("");
return 0;
}
10 changes: 9 additions & 1 deletion math/convolution_mod_2_64/hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,13 @@
"small_14.in": "87427784073b4876a5dd6900367fe0a9b8774ce0a6f8a14870fa0c1908749ee5",
"small_14.out": "66375c0fee20c6abddae29ceb15f3b852c9266825dd183c6ea2033277e5acf4d",
"small_15.in": "9577a726734544ff4a829436e56cb05a2661c184e8875244171128ecd031d332",
"small_15.out": "8ef7e3a9582c31fc7e8dcad1b6b4bd45c8b180bb834f957fd130ae82b648427e"
"small_15.out": "8ef7e3a9582c31fc7e8dcad1b6b4bd45c8b180bb834f957fd130ae82b648427e",
"small_and_large_00.in": "8bd88d3f0f5f75daaf6306b26a0ae693363176f4484a778d26ee7b60b2798f1a",
"small_and_large_00.out": "35fc5465bff1291bddea1bb6899bb02015fbaca72c3358aa564ab0dddede1c3e",
"small_and_large_01.in": "4891ff2bbb2137907958f3af95b40926d9fa29afc14eff158a6e89cf2f92c704",
"small_and_large_01.out": "8b86238f96da68801bbd30f3a1d233fd9478751dd9d3d327d268effef6499fb6",
"small_and_large_02.in": "621c42d7d6eaba2e2f660738de7b18d7993662a293409e26e2c425aaa93b618e",
"small_and_large_02.out": "38ca3e0c51af5538ffb3bc66749111ba45b9d1fae9d20e26f59df15bd3f31694",
"small_and_large_03.in": "84812d82e06ec12e935e9632c3de63d4f5f01bf1c9ad657c7fd49ae0b372d239",
"small_and_large_03.out": "451ea25b51f574726d74bd72e881da56daf57405bb02c5989364fa0e0750b078"
}
3 changes: 3 additions & 0 deletions math/convolution_mod_2_64/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/664"
[[tests]]
name = "gen_524288.cpp"
number = 2
[[tests]]
name = "small_and_large.cpp"
number = 4

[[solutions]]
name = "radix3.cpp"
Expand Down
27 changes: 27 additions & 0 deletions math/convolution_mod_large/gen/small_and_large.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "random.h"

#include <cstdio>

#include "../fastio.h"
#include "../params.h"
using namespace std;

int main(int, char* argv[]) {
long long seed = atoll(argv[1]);
auto gen = Random(seed);

int ns[] = {100, 1000};
int n = ns[seed & 1];
int m = N_AND_M_MAX;
if (seed & 2) swap(n, m);

vector<int> a(n), b(m);

for (int i = 0; i < n; i++) { a[i] = gen.uniform(0ll, MOD - 1); }
for (int i = 0; i < m; i++) { b[i] = gen.uniform(0ll, MOD - 1); }

wtn(n, ' ', m);
wtv(a);
wtv(b);
return 0;
}
8 changes: 8 additions & 0 deletions math/convolution_mod_large/hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@
"small_14.out": "85c3fd86c69853bf54cccdf37c0a343d14850bdbd6fcefeab6c3a4132c2c0e2e",
"small_15.in": "ccb7c3695a22c9c1afb1dedbbfcc58c29b8d817dd6c74f015a61c8980b5f98db",
"small_15.out": "c10e4f298ec1d47116c30c26e16b48713231fb0456775a235ae146ebf746c865",
"small_and_large_00.in": "a95d6c2f80fc411fdaaaa6819af154e38bd3719033d1d5eea026095589d656e2",
"small_and_large_00.out": "c6f095f9caaf9f99198d5f99d9299145a27c3b67c0f68b1535e9c66941f9be63",
"small_and_large_01.in": "099c2fcd017be13f3e9b9a8690e42df113764883cb1d0ba90934d63795baf9c7",
"small_and_large_01.out": "ab3629ec79ef80852083d4ec0c89659c0578de45385463e1880cbfc046ce215d",
"small_and_large_02.in": "422be53574b3d69020fd1df9c55793008690edbb2409b3a78aea42c4908e6e7e",
"small_and_large_02.out": "94f964722aa44313e2011c43b6db5db1a3e0d2a580dfb9ef78bf2510dd1e8d14",
"small_and_large_03.in": "f27c2e7890e48bc845f4ad806ef6aab50f9a12279966045a6c48fedee11d10f7",
"small_and_large_03.out": "dbe29b1c970d1e04867c02e513b8662f33df8105cea9c87a5b77306d0f1606fd",
"unsigned_overflow_00.in": "9ebbc9ee08996e7a352c1f688574cb0021ecc6e1d02ffbc1515486721452084c",
"unsigned_overflow_00.out": "0229b0cd8035b7b20369a57a10deaab40f8d3826b1816b2142731965a4c3274a"
}
3 changes: 3 additions & 0 deletions math/convolution_mod_large/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/720"
[[tests]]
name = "medium_pre_suf_zero.cpp"
number = 5
[[tests]]
name = "small_and_large.cpp"
number = 4

[[solutions]]
name = "naive.cpp"
Expand Down

0 comments on commit 8d0ba7a

Please sign in to comment.