-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgenerate.cpp
More file actions
33 lines (27 loc) · 758 Bytes
/
Copy pathgenerate.cpp
File metadata and controls
33 lines (27 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <bits/stdc++.h>
using namespace std;
int main () {
auto seed = chrono::high_resolution_clock::now().time_since_epoch().count();
mt19937 gen(seed);
cerr << "Enter params (n colorCount): ";
int n, colorCount;
cin >> n >> colorCount;
cerr << "Enter name: ";
string name;
cin >> name;
cerr << "Enter number of tests: ";
int tc;
cin >> tc;
uniform_int_distribution<> dis(1, colorCount);
for (int p = 1; p <= tc; p++) {
ofstream cout("test/" + name + to_string(p));
cout << n << endl;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cout << dis(gen) << " ";
}
cout << endl;
}
}
return 0;
}