0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-08 20:38:47 +00:00
OI-codes/S2OJ/1676/data/gen.cpp

46 lines
1.1 KiB (Stored with Git LFS)
C++

#include "testlib.h"
#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int id = opt<int>("id");
int min_n = 100000, max_n = 100000;
int min_m = 1000000000, max_m = 1000000000;
if (id <= 5) min_n = 1, max_n = 500;
else if (id <= 10) min_n = 500, max_n = 1000;
else if (id <= 15) min_n = 1000, max_n = 1000;
else if (id <= 20) min_m = 100000, max_m = 500000;
else if (id <= 25) min_m = 1000000, max_m = 1000000;
int n = rnd.next(min_n, max_n);
int m = rnd.next(min_m, max_m);
int k = rnd.next(min_n, max_n);
cout << n << ' ' << m << ' ' << k << endl;
for (int i = 1; i <= n; i++) {
int l = rnd.next(1, m);
int r = rnd.next(l, m);
int x = rnd.next(l, r);
int y = rnd.next(x, r);
if (25 < id && id <= 40) x = l, y = r;
cout << l << ' ' << x << ' ' << y << ' ' << r << endl;
}
for (int i = 1; i <= k; i++) {
cout << rnd.next(1, m) << " \n"[i == k];
}
return 0;
}