#include "triangles.h"
bool isdiag(int a, int b, int c, int d) { // a - c
	// a = 0 b = 1 c = 2 d = 3
	std::vector<Triangle> left = { Triangle(a, b, c), Triangle(a, c, d) };
	std::vector<Triangle> right = { Triangle(b, c, d), Triangle(a, b, d) };
	int compare_result = compare(left, right);
	return compare_result == 0;
}
std::vector<std::vector<int>> ret(int a, int b, int c, int d) { // a - c
	// a = 0 b = 1 c = 2 d = 3
	std::vector<std::vector<int>> ans;
	ans.push_back(std::vector<int>(3));
	ans.push_back(std::vector<int>(3));
	ans[0][0] = 0;
	ans[0][1] = 1;
	ans[0][2] = 2;
	ans[1][0] = 0;
	ans[1][1] = 3;
	ans[1][2] = 2;
	return ans;
}
std::vector<std::vector<int>> solve(int n) {
    // Example of compare:
    // Пример использования функции compare:
    // compare_result should be equal to 0.
    // compare_result будет равняться нулю, так как сравнивались одинаковые треугольники.
    std::vector<std::vector<int>> ans;
    ans.push_back(std::vector<int>(3));
	ans.push_back(std::vector<int>(3));
	for (int a = 0; a < 4; a++) {
		for (int b = 0; b < 4; b++) {
			for (int c = 0; c < 4; c++) {
				for (int d = 0; d < 4; d++) {
					set<int> st = { a, b, c, d };
					if (st.size() == 4 && isdiag(a, b, c, d)) {
						return ret(a, b, c, d);
					}
				}
			}
		}
	}
}
