Skip to content

Commit

Permalink
Merge pull request #1268 from maspypy/1265
Browse files Browse the repository at this point in the history
テストケース追加(1265)
  • Loading branch information
maspypy authored Oct 29, 2024
2 parents c6bfe96 + f30d293 commit 282988c
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 0 deletions.
34 changes: 34 additions & 0 deletions data_structure/line_add_get_min/gen/no_output.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "random.h"
#include "../params.h"
#include <iostream>

using namespace std;
using ll = long long;

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++) {
int a = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
ll b = gen.uniform(-B_ABS_MAX, B_ABS_MAX);
printf("%d %lld\n", a, b);
}
for (int i = 0; i < q; i++) {
// int t = gen.uniform(0, 1);
int t = 0;
printf("%d ", t);
if (t == 0) {
int a = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
ll b = gen.uniform(-B_ABS_MAX, B_ABS_MAX);
printf("%d %lld\n", a, b);
} else {
int p = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
printf("%d\n", p);
}
}
return 0;
}
2 changes: 2 additions & 0 deletions data_structure/line_add_get_min/hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"max_random_01.out": "f61d30a83912729d5373bdea3d13f99d357b2dfe57c9e2953757afd7d37fd855",
"max_random_02.in": "bcac6c14e44ebe5f4caef8efda48ed09cb22bb8634b19df718414c8ec091dd57",
"max_random_02.out": "c7fb9047a0cc7be4d2442fefb39e1f7db382cdac66f05b87878c971cad5febe6",
"no_output_00.in": "1824b919923fecd5dd3a7162594b36957f499140efaad3c5300ae42ea5713508",
"no_output_00.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"parabola_random_00.in": "36a13fae1373661dad1e2a50012d00974e0954bdebcfafeb6b041a2d78ec7d7a",
"parabola_random_00.out": "c8e90757fa6f3ba4a90debe3073f2548c525bc66b97fcfb275b7d5ea612aa383",
"parabola_random_01.in": "0f610aa63ac4f3703de42328183bc26f85b2acbecd6d8ca3646fa59e67ce5d1d",
Expand Down
3 changes: 3 additions & 0 deletions data_structure/line_add_get_min/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/174"
[[tests]]
name = "half.cpp"
number = 1
[[tests]]
name = "no_output.cpp"
number = 1

[[solutions]]
name = "naive.cpp"
Expand Down
44 changes: 44 additions & 0 deletions data_structure/segment_add_get_min/gen/no_output.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#include "random.h"
#include "../params.h"
#include <iostream>

using namespace std;
using ll = long long;

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++) {
int l, r;
do {
l = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
r = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
} while (l >= r);
int a = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
ll b = gen.uniform(-B_ABS_MAX, B_ABS_MAX);
printf("%d %d %d %lld\n", l, r, a, b);
}
for (int i = 0; i < q; i++) {
// int t = gen.uniform(0, 1);
int t = 0;
printf("%d ", t);
if (t == 0) {
int l, r;
do {
l = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
r = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
} while (l >= r);
int a = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
ll b = gen.uniform(-B_ABS_MAX, B_ABS_MAX);
printf("%d %d %d %lld\n", l, r, a, b);
} else {
int p = gen.uniform(-A_ABS_MAX, A_ABS_MAX);
printf("%d\n", p);
}
}
return 0;
}
2 changes: 2 additions & 0 deletions data_structure/segment_add_get_min/hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"max_random_01.out": "14edc814990b0ff1fad4316d8d2e4f4b5affc54227c3d1034e6db6f83b2a6ab5",
"max_random_02.in": "b8d6df9a3f30f3e428afeb4d58abbec07a403db077fd7f0d445a169c2c67162d",
"max_random_02.out": "fc693fc9f038ed21026abdf43c6fa614b65ab88a22774cdfa12d58669b79c1b5",
"no_output_00.in": "81568951c5ab695f6de61c3d41bf303d38ae537bc00acb554419a418800ae45f",
"no_output_00.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"random_00.in": "d63d05b56ba00840c5343054e5ad530604e50cdf6bd9f2c1cc9d6fa3bed3c9f1",
"random_00.out": "f2aaff082854ca8568cae3ba591cf08752d57b7176f590eccf9f94adb555a4a6",
"random_01.in": "eece684afeb33f69e823849eaf0b6b09ad2a0c43576c86f74a189641883db6f5",
Expand Down
3 changes: 3 additions & 0 deletions data_structure/segment_add_get_min/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/211"
[[tests]]
name = "all_twice.cpp"
number = 1
[[tests]]
name = "no_output.cpp"
number = 1

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

0 comments on commit 282988c

Please sign in to comment.