#include "triangles.h"
using namespace std;
std::vector<std::vector<int>> solve(int n) {
	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			for (int k = j + 1; k < n; k++) {
				for (int ost = 0; ost < n; ost++) {
					if (ost == i || ost == j
						|| ost == k)continue;
					vector <Triangle> r, l;
					r.push_back(Triangle(i, j, k));
					l.push_back(Triangle(i, j, ost));
					l.push_back(Triangle(i, k, ost));
					l.push_back(Triangle(k, j, ost));
					int res = compare(l, r);
					if (res == 0) {
						vector <vector <int>> ans = { {i,j,ost},{i,k,ost},{k,j,ost} };
						return ans;
					}
				}
			}
		}
	}
	std::vector<std::vector<int>> ans;
	int v1 = 0;
	for (int v2 = 1; v2 < n; v2++) {
		for (int v3 = 1; v3 < n; v3++) {
			if (v2 == v3)continue;
			for (int v4 = 1; v4 < n; v4++) {
				if (v2 == v4 || v3 == v4)continue;
				vector <Triangle> r, l;
				r.push_back(Triangle(v1, v2, v3));
				r.push_back(Triangle(v4, v2, v3));
				l.push_back(Triangle(v2, v1, v4));
				l.push_back(Triangle(v3, v1, v4));
				int res = compare(l, r);
				if (res == 0) {
					vector <vector <int>> ans = { {v1,v2,v3,v4} };
					return ans;
				}
			}
		}
	}
	
}