aboutsummaryrefslogtreecommitdiff
path: root/20/day2/triangles_gen.cpp
blob: fec17ae97c195f924ed9e19f6a06118dfd146437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
typedef pair<int, int> ii;

int M = 10000;

int main() {
	ofstream cout("triangles.in");

	int N = 100;
	cout << N << '\n';
	srand(time(0));
	vector<ii> v;
	for (int i = 0; i < N; ++i) {
		ii x;
		do {
			x.f = (rand() % (2 * M)) - M, x.s = (rand() % (2 * M)) - M;
		} while (find(v.begin(), v.end(), x) != v.end());
		v.push_back(x);
		cout << x.f << ' ' << x.s << '\n';
	}
}