#include "triangles.h"

std::vector<std::vector<int>> solve(int n) {
	std::vector<Triangle> left;
	std::vector<Triangle> right;
	std::vector<std::vector<int>> ans;
	int compare_result;

	left = { Triangle(0, 1, 2), Triangle(1, 2, 3), Triangle(0, 2, 3) };
	right = { Triangle(0, 1, 3) };
	compare_result = compare(left, right);

	if (compare_result == 0) {
		ans.push_back({ 0, 1, 2 });
		ans.push_back({ 0, 2, 3 });
		return ans;
	}


	left = { Triangle(0, 1, 3), Triangle(1, 2, 3), Triangle(0, 2, 3) };
	right = { Triangle(0, 1, 2) };
	compare_result = compare(left, right);

	if (compare_result == 0) {
		ans.push_back({ 0, 1, 3 });
		ans.push_back({ 1, 2, 3 });
		return ans;
	}


	left = { Triangle(0, 1, 2), Triangle(0, 1, 3), Triangle(0, 2, 3) };
	right = { Triangle(1, 2, 3) };
	compare_result = compare(left, right);

	if (compare_result == 0) {
		ans.push_back({ 0, 1, 2 });
		ans.push_back({ 0, 2, 3 });
		return ans;
	}


	left = { Triangle(0, 1, 3), Triangle(1, 2, 3), Triangle(0, 1, 2) };
	right = { Triangle(0, 2, 3) };
	compare_result = compare(left, right);

	if (compare_result == 0) {
		ans.push_back({ 0, 1, 3 });
		ans.push_back({ 1, 2, 3 });
		return ans;
	}


	ans.push_back({ 0, 1, 2 });
	ans.push_back({ 0, 2, 3 });
	return ans;
}
