-
-
Notifications
You must be signed in to change notification settings - Fork 125
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 #1162 from maspypy/1125
テストケース追加(issue 1125)
- Loading branch information
Showing
12 changed files
with
166 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,33 @@ | ||
#include <cstdio> | ||
#include "../params.h" | ||
#include "random.h" | ||
|
||
using namespace std; | ||
|
||
int main(int, char* argv[]) { | ||
long long seed = atoll(argv[1]); | ||
auto gen = Random(seed); | ||
|
||
int ns[] = {100, 1000}; | ||
int n = ns[seed & 1]; | ||
int m = N_AND_M_MAX; | ||
if (seed & 2) swap(n, m); | ||
|
||
vector<int> a(n), b(m); | ||
|
||
for (int i = 0; i < n; i++) { a[i] = gen.uniform(0ll, MOD - 1); } | ||
for (int i = 0; i < m; i++) { b[i] = gen.uniform(0ll, MOD - 1); } | ||
|
||
printf("%d %d\n", n, m); | ||
for (int i = 0; i < n; i++) { | ||
printf("%d", a[i]); | ||
if (i != n - 1) printf(" "); | ||
} | ||
printf("\n"); | ||
for (int i = 0; i < m; i++) { | ||
printf("%d", b[i]); | ||
if (i != m - 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
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,33 @@ | ||
#include <cstdio> | ||
#include "../params.h" | ||
#include "random.h" | ||
|
||
using namespace std; | ||
|
||
int main(int, char* argv[]) { | ||
long long seed = atoll(argv[1]); | ||
auto gen = Random(seed); | ||
|
||
int ns[] = {100, 1000}; | ||
int n = ns[seed & 1]; | ||
int m = N_AND_M_MAX; | ||
if (seed & 2) swap(n, m); | ||
|
||
vector<int> a(n), b(m); | ||
|
||
for (int i = 0; i < n; i++) { a[i] = gen.uniform(0ll, MOD - 1); } | ||
for (int i = 0; i < m; i++) { b[i] = gen.uniform(0ll, MOD - 1); } | ||
|
||
printf("%d %d\n", n, m); | ||
for (int i = 0; i < n; i++) { | ||
printf("%d", a[i]); | ||
if (i != n - 1) printf(" "); | ||
} | ||
printf("\n"); | ||
for (int i = 0; i < m; i++) { | ||
printf("%d", b[i]); | ||
if (i != m - 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
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,28 @@ | ||
#include <stdio.h> | ||
#include "../params.h" | ||
#include "random.h" | ||
|
||
using namespace std; | ||
|
||
int main(int, char* argv[]) { | ||
const long long seed = atoll(argv[1]); | ||
auto rng = Random(seed); | ||
|
||
int ns[] = {100, 1000}; | ||
int n = ns[seed & 1]; | ||
int m = N_AND_M_MAX; | ||
if (seed & 2) swap(n, m); | ||
|
||
printf("%d %d\n", n, m); | ||
for (int i = 0; i < n; ++i) { | ||
if (i > 0) printf(" "); | ||
printf("%llu", rng.uniform(0ULL, ~0ULL)); | ||
} | ||
puts(""); | ||
for (int i = 0; i < m; ++i) { | ||
if (i > 0) printf(" "); | ||
printf("%llu", rng.uniform(0ULL, ~0ULL)); | ||
} | ||
puts(""); | ||
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
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,27 @@ | ||
#include "random.h" | ||
|
||
#include <cstdio> | ||
|
||
#include "../fastio.h" | ||
#include "../params.h" | ||
using namespace std; | ||
|
||
int main(int, char* argv[]) { | ||
long long seed = atoll(argv[1]); | ||
auto gen = Random(seed); | ||
|
||
int ns[] = {100, 1000}; | ||
int n = ns[seed & 1]; | ||
int m = N_AND_M_MAX; | ||
if (seed & 2) swap(n, m); | ||
|
||
vector<int> a(n), b(m); | ||
|
||
for (int i = 0; i < n; i++) { a[i] = gen.uniform(0ll, MOD - 1); } | ||
for (int i = 0; i < m; i++) { b[i] = gen.uniform(0ll, MOD - 1); } | ||
|
||
wtn(n, ' ', m); | ||
wtv(a); | ||
wtv(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