#include "gen.h"

/**
 * Author: Niyaz Nigmatullin
 */

using namespace std;

int main(int argc, char **argv) {
	registerGen(argc, argv, 1);
	int n = opt<int>("n");
	int maxC = opt<int>("colors", MAX_COLORS);
	int t = opt<int>("tests", MAX_TOTAL_CELLS);
	vector<test> tests;
	int total_cells = 0;
	while ((int) tests.size() < t && total_cells + n * n <= MAX_TOTAL_CELLS) {
		vector<vector<int>> field(n, vector<int>(n));
		for (auto &row : field) {
			for (auto &cell : row) {
				cell = rnd.next(0, maxC - 1);
			}
		}
		tests.push_back(test {n, std::move(field)});
		total_cells += n * n;
	}
	printTests(tests);
}
