forked from yosupo06/library-checker-problems
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request yosupo06#1127 from maspypy/issue_1098
テストケース追加 1098
- Loading branch information
Showing
5 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
17 8 | ||
1 1 2 4 7 11 16 22 29 37 46 56 67 79 92 106 121 | ||
100000 100000 100000 100000 100000 100000 100000 2 |
25 changes: 25 additions & 0 deletions
25
math/min_plus_convolution_convex_arbitrary/gen/large_small.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <cstdio> | ||
#include "../params.h" | ||
#include "random.h" | ||
#include <vector> | ||
|
||
#include "common.hpp" | ||
|
||
int main(int, char* argv[]) { | ||
long long seed = atoll(argv[1]); | ||
auto gen = Random(seed); | ||
|
||
int ns[] = {N_MAX, N_MAX, 1, 2}; | ||
int ms[] = {1, 2, N_MAX, N_MAX}; | ||
|
||
int n = ns[seed % 4]; | ||
int m = ms[seed % 4]; | ||
|
||
int LIM_1 = A_MAX / n; | ||
|
||
vector<ll> A = rand_gen(gen, n, -LIM_1, +LIM_1); | ||
vector<ll> B = rand_B(gen, m); | ||
out(A, B); | ||
|
||
return 0; | ||
} |
29 changes: 29 additions & 0 deletions
29
math/min_plus_convolution_convex_arbitrary/gen/only_first_small.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <cstdio> | ||
#include "../params.h" | ||
#include "random.h" | ||
#include <vector> | ||
|
||
#include "common.hpp" | ||
|
||
int main(int, char* argv[]) { | ||
long long seed = atoll(argv[1]); | ||
auto gen = Random(seed); | ||
|
||
int n = N_MAX; | ||
int m = N_MAX; | ||
|
||
int LIM_1 = A_MAX / n * 3; | ||
|
||
vector<ll> A = rand_gen(gen, n, -LIM_1, +LIM_1); | ||
vector<ll> B(m); | ||
for (int i = 0; i < m; ++i) { | ||
B[i] = gen.uniform<int>(A_MAX * 9 / 10, A_MAX); | ||
} | ||
|
||
int idx = (seed % 2 == 0 ? 0 : m - 1); | ||
B[idx] = A_MIN; | ||
|
||
out(A, B); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters