Skip to content

Commit

Permalink
Merge pull request yosupo06#1229 from maspypy/1223
Browse files Browse the repository at this point in the history
テストケース追加(1223)
  • Loading branch information
maspypy authored Aug 26, 2024
2 parents ef40182 + 3955031 commit 270a1f9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions data_structure/static_range_lis_query/gen/issue_1223.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <cstdlib>

#include "../params.h"
#include "random.h"
#include <tuple>

int main(int, char *argv[]) {
const int case_index = std::atoll(argv[1]);
Random gen(case_index ^ 134268020235868123ULL);

const int N = N_MAX;
const int Q = Q_MAX;

std::vector<int> P;
for (int i = N / 2; i <= N; ++i) P.emplace_back(i);
for (int i = 1; i < N / 2; ++i) P.emplace_back(i);
for (auto &x: P) --x;

std::vector<std::pair<int, int>> qs(Q);
for (auto &[l, r]: qs) {
std::tie(l, r) = gen.uniform_pair(0, N + 1);
r -= 1;
}

std::printf("%d %d\n", N, Q);
for (int i = 0; i < N; i++) { std::printf("%d%c", P[i], " \n"[i + 1 == N]); }
for (const auto &[l, r]: qs) { std::printf("%d %d\n", l, r); }

return 0;
}
2 changes: 2 additions & 0 deletions data_structure/static_range_lis_query/hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"almost_sorted_02.out": "a98908b8c7b38a235699a0058db6ff3c319640b2a866fb1b23f824a307b09dbc",
"example_00.in": "69096622a8c163be888890e594de45c616fe42e6d82a30d8b4f1a90cf20450b2",
"example_00.out": "e276bf5020690365b8bdd80561653a99a6dd4a9e65a7c6c894dbd12de4e982fd",
"issue_1223_00.in": "84f9ab795ac3b59021fda095b7c3eb4b89f16352886650f3b389f6741243139e",
"issue_1223_00.out": "6dee41e13ac8a9594a51b04166c6d5690f464b3299098d7344223979223ec7cf",
"max_random_00.in": "694dc2a79252a383396047e7c619b73365d7266e0e24a8f410822425d57fe44c",
"max_random_00.out": "75570e069bf48cec30005b4adb16f27b26a1eb7b487cd093b61674eedfff2193",
"max_random_01.in": "37e7602f0f2af0da76d2dec6d32fce39915a559f60d13bebbf8f1bd7b8b89124",
Expand Down
3 changes: 3 additions & 0 deletions data_structure/static_range_lis_query/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/737"
[[tests]]
name = "sorted.cpp"
number = 1
[[tests]]
name = "issue_1223.cpp"
number = 1

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

0 comments on commit 270a1f9

Please sign in to comment.