Skip to content

Commit

Permalink
Merge pull request yosupo06#1199 from maspypy/1169
Browse files Browse the repository at this point in the history
テストケース追加(1169)
  • Loading branch information
NachiaVivias authored Jul 3, 2024
2 parents 4b75e45 + 7a32367 commit 7d7079a
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
3 changes: 3 additions & 0 deletions math/polynomial_interpolation/gen/1169_00.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
3
0 1 2
1 2 3
30 changes: 30 additions & 0 deletions math/polynomial_interpolation/gen/x_zero.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <iostream>
#include "random.h"

using namespace std;

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

int n = (1 << 17);
vector<int> x = gen.choice(n, 1, 998244352); // avoid zero
vector<int> y(n);
for (int i = 0; i < n; i++) { y[i] = gen.uniform(0, 998244352); }

int idx = gen.uniform<int>(0, n - 1);
x[idx] = 0;

printf("%d\n", n);
for (int i = 0; i < n; i++) {
printf("%d", x[i]);
if (i != n - 1) printf(" ");
}
printf("\n");
for (int i = 0; i < n; i++) {
printf("%d", y[i]);
if (i != n - 1) printf(" ");
}
printf("\n");
return 0;
}
6 changes: 5 additions & 1 deletion math/polynomial_interpolation/hash.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"1169_00.in": "01fa2df384d0e2d5a9a0f8a63c64935210f6c625ccfacd20dd5e8edab1234a64",
"1169_00.out": "63e9513edcd96636e7a78d2dc432a9d971f3ca5de1d1bcb4c8ffd2bcac8dd7c2",
"example_00.in": "745a5014aa4ade554b909ed460261559945e0cb444366b1fc0711648895aaa3f",
"example_00.out": "e085ba5d29787095f6e2bad7b1309b2ae13208e58bea570c84c0dd651de681b9",
"example_01.in": "8f0ebdb9a3d767b099c3e12776d35d390525a3f6b28090aea0cfd82c1bfcea72",
Expand All @@ -12,5 +14,7 @@
"random_01.in": "3f277d067e254684f93b173a5405ca85656ebc3cc5a1fe926915aec58c4e40c5",
"random_01.out": "a0b93bf865afafc2572c9aac67a4436783b61d7f6a8be134f9bc57d6733731e4",
"random_02.in": "c1fa3c399be5c03fdc49f685a50d23d208454f0fdbc247b287e56716abced21f",
"random_02.out": "307ad8b9e2da40a0319605e91126fe88b3eff1d9415a0069f64dd5ed858b92b6"
"random_02.out": "307ad8b9e2da40a0319605e91126fe88b3eff1d9415a0069f64dd5ed858b92b6",
"x_zero_00.in": "a70c2efb776b7654bcabff3582dc215da344650483826a59283834b2998e74a3",
"x_zero_00.out": "63d84105de9685f46d7ebaf80c864e0a1934a1c04a03ad407041f3736c7d5217"
}
6 changes: 6 additions & 0 deletions math/polynomial_interpolation/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/46"
[[tests]]
name = "max_random.cpp"
number = 2
[[tests]]
name = "1169.in"
number = 1
[[tests]]
name = "x_zero.cpp"
number = 1

0 comments on commit 7d7079a

Please sign in to comment.