-
-
Notifications
You must be signed in to change notification settings - Fork 124
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 #1268 from maspypy/1265
テストケース追加(1265)
- Loading branch information
Showing
6 changed files
with
88 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,34 @@ | ||
#include "random.h" | ||
#include "../params.h" | ||
#include <iostream> | ||
|
||
using namespace std; | ||
using ll = long long; | ||
|
||
int main(int, char* argv[]) { | ||
long long seed = atoll(argv[1]); | ||
auto gen = Random(seed); | ||
|
||
int n = N_AND_Q_MAX; | ||
int q = N_AND_Q_MAX; | ||
printf("%d %d\n", n, q); | ||
for (int i = 0; i < n; i++) { | ||
int a = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
ll b = gen.uniform(-B_ABS_MAX, B_ABS_MAX); | ||
printf("%d %lld\n", a, b); | ||
} | ||
for (int i = 0; i < q; i++) { | ||
// int t = gen.uniform(0, 1); | ||
int t = 0; | ||
printf("%d ", t); | ||
if (t == 0) { | ||
int a = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
ll b = gen.uniform(-B_ABS_MAX, B_ABS_MAX); | ||
printf("%d %lld\n", a, b); | ||
} else { | ||
int p = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
printf("%d\n", p); | ||
} | ||
} | ||
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,44 @@ | ||
#include "random.h" | ||
#include "../params.h" | ||
#include <iostream> | ||
|
||
using namespace std; | ||
using ll = long long; | ||
|
||
int main(int, char* argv[]) { | ||
long long seed = atoll(argv[1]); | ||
auto gen = Random(seed); | ||
|
||
int n = N_AND_Q_MAX; | ||
int q = N_AND_Q_MAX; | ||
printf("%d %d\n", n, q); | ||
for (int i = 0; i < n; i++) { | ||
int l, r; | ||
do { | ||
l = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
r = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
} while (l >= r); | ||
int a = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
ll b = gen.uniform(-B_ABS_MAX, B_ABS_MAX); | ||
printf("%d %d %d %lld\n", l, r, a, b); | ||
} | ||
for (int i = 0; i < q; i++) { | ||
// int t = gen.uniform(0, 1); | ||
int t = 0; | ||
printf("%d ", t); | ||
if (t == 0) { | ||
int l, r; | ||
do { | ||
l = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
r = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
} while (l >= r); | ||
int a = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
ll b = gen.uniform(-B_ABS_MAX, B_ABS_MAX); | ||
printf("%d %d %d %lld\n", l, r, a, b); | ||
} else { | ||
int p = gen.uniform(-A_ABS_MAX, A_ABS_MAX); | ||
printf("%d\n", p); | ||
} | ||
} | ||
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