#include "triangles.h"

using namespace std;
vector<vector<int>> solve(int n) {
    vector<Triangle> tr;
    tr.push_back(Triangle(1, 2, 3));
    tr.push_back(Triangle(0, 2, 3));
    tr.push_back(Triangle(0, 1, 3));
    tr.push_back(Triangle(0, 1, 2));
    int inside = -1;
    for (int i = 0; i < 4; i++) {
        vector<Triangle> lft = {tr[i]};
        vector<Triangle> rgt = {};
        for (int j = 0; j < 4; j++) {
            if (j != i) {
                rgt.push_back(tr[j]);
            }
        }
        if (compare(lft, rgt) == 0) {
            inside = i;
            break;
        }
    }
    if (inside == -1) {
        if (compare({Triangle(0, 1, 2), Triangle(0, 1, 3)}, {Triangle(1, 2, 3), Triangle(0, 2, 3)}) == 0) {
            return {{0, 2, 1, 3}};
        } else {
            return {{0, 1, 2, 3}};
        }
    } else {
        vector<int> ans;
        for (int i = 0; i < n; i++) {
            if (i != inside) {
                ans.push_back(i);
            }
        }
        return {ans};
    }
};