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.
- Loading branch information
maspypy
committed
Jul 3, 2024
1 parent
4f4d555
commit 7a32367
Showing
3 changed files
with
36 additions
and
1 deletion.
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,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; | ||
} |
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