diff --git a/datastructure/staticrmq/gen/small_values.cpp b/datastructure/staticrmq/gen/small_values.cpp new file mode 100644 index 000000000..4e84d1062 --- /dev/null +++ b/datastructure/staticrmq/gen/small_values.cpp @@ -0,0 +1,24 @@ +#include +#include "random.h" +#include "../params.h" + +using namespace std; + +int main(int, char* argv[]) { + long long seed = atoll(argv[1]); + auto gen = Random(seed); + + int n = N_AND_Q_MAX; + int q = N_AND_Q_MAX; + printf("%d %d\n", n, q); + for (int i = 0; i < n; i++) { + printf("%d", gen.uniform(0, 10)); + if (i != n - 1) printf(" "); + } + printf("\n"); + for (int i = 0; i < q; i++) { + auto p = gen.uniform_pair(0, n); + printf("%d %d\n", p.first, p.second); + } + return 0; +} diff --git a/datastructure/staticrmq/hash.json b/datastructure/staticrmq/hash.json index 6ac3a3ac5..a00bb2e06 100644 --- a/datastructure/staticrmq/hash.json +++ b/datastructure/staticrmq/hash.json @@ -41,6 +41,8 @@ "small_08.out": "5b53075569dee2b034608052c2a7c15728749aff5c1d4637be3e07cb32e2266f", "small_09.in": "6217d962eb1c210bd2633ed40f634443f89bf1f09476cac687c8f93fcbcc68b0", "small_09.out": "45f1cbe5565b477fd1543b4a279b592034eddd525f886bd78d476dae016f9b39", + "small_values_00.in": "9f7359c01bcd6465c0a4094f0b6e2bd2c8fd3b00a6c08ef843e1f174678374c9", + "small_values_00.out": "03860febffae10b28f5dc1394a401ef9da2e96e152870c4586a2f27637e8f74c", "small_width_query_00.in": "ec3d4ee7eb7012baf392a418b5ba59806da3fedca6d1a2445b7d070c8b6c655c", "small_width_query_00.out": "1c84aec7894596ac25144ff469196151ea899e38cd7beb614659fb242876e3c1", "small_width_query_01.in": "d64f099a2ad881290533da2fab070961a0443ae4a11fd266a5a8d7f2284e82fb", diff --git a/datastructure/staticrmq/info.toml b/datastructure/staticrmq/info.toml index c08c9168f..2e1099ab9 100644 --- a/datastructure/staticrmq/info.toml +++ b/datastructure/staticrmq/info.toml @@ -17,6 +17,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/34" [[tests]] name = "small_width_query.cpp" number = 5 +[[tests]] + name = "small_values.cpp" + number = 1 [params] N_AND_Q_MAX = 500_000