#include "triangles.h"
using namespace std;

vector<int> get(int h) {
    vector<int> d(0);
    for (int i = 0; i < 4; i++) {
        if (h == i) {
            continue;
        }
        d.push_back(i);
    }
    return d;
}

vector<vector<int>> solve(int n) {
    // Example of compare:
    // Пример использования функции compare:
    //vector<Triangle> left = {Triangle(0, 1, 2)};
    //vector<Triangle> right = {Triangle(0, 1, 2)};
    for (int i = 0; i < 4; i++) {
        vector<int> d = get(i);
        vector<vector<int> > a(0);
        for (int j = 0; j < 4; j++) {
            if (j == i) {
                continue;
            }
            a.push_back(get(j));
        }
        std::vector<Triangle> left = {Triangle(d[0], d[1], d[2])};
        std::vector<Triangle> right = {Triangle(a[0][0], a[0][1], a[0][2]), Triangle(a[1][0], a[1][1], a[1][2]), Triangle(a[2][0], a[2][1], a[2][2])};
        int cr = compare(left, right);
        if (cr == 0) {
            return a;
        }
    }
    // Example of return:
    // Пример возвращаемого значения:
    vector<vector<int>> ans;
    ans.push_back(vector<int>(n));
    for (int i = 0; i < n; ++i) {
        ans[0][i] = i;
    }
    return ans;
}
