usaco-camp

Short, concise solutions for problems from the USACO camp

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 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';
	}
}