#include <bits/stdc++.h>
#include "triangles.h"

using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

vector <vector <int>> solve(int n) {
    int best = 0;
    vector <Triangle> maybe = {Triangle(1, 2, 3), Triangle(0, 2, 3), Triangle(0, 1, 3), Triangle(0, 1, 2)};
    for (int i = 1; i < 4; ++i) {
        vector<Triangle> left = {maybe[best]}, right = {maybe[i]};
        if (compare(left, right) == -1) {
            best = i;
        }
    }
    vector<Triangle> left;
    for (int i = 0; i < 4; ++i) if (i != best) {
        left.push_back(maybe[i]);
    }
    vector<Triangle> right = {maybe[best]};
    if (compare(left, right) == 0) {
        vector <vector <int>> ans(1);
        for (int i = 0; i < 4; ++i) if (i != best) {
            ans[0].push_back(i);
        }
        return ans;
    }
    vector <vector <int>> ans(2);
    ans[0] = {0, 1, 2};
    ans[1] = {0, 1, 3};
    return ans;
}
